How to use eventHandlers and uploadEvntHandlers with angularjs 1 http requests?
<p>I tried this code with no success </p>

<pre><code>$http({
    method:"GET",
    url:"data/mycooljsonfile.json",
    eventHandlers:{
        onprogress:function(event){
        console.log("progress");
        console.log(event);
    },onreadystatechange:function(event){
        console.log("change");
        console.log(event);
    }
    },
    uploadEventHandlers:{
         onprogress:function(object){
              console.log(object);
         }
    }
})
.success(function(json){ // succès
     $scope.lemmes=json;
      //console.log($http);
}).error(function(error){ // erreur
    console.log(error);
});
</code></pre>

<p>I checked here : </p>

<p><a href="https://docs.angularjs.org/api/ng/service/" rel="nofollow">https://docs.angularjs.org/api/ng/service/</a>$http</p>

<p>and there :</p>

<p><a href="https://www.w3.org/TR/XMLHttpRequest/#events" rel="nofollow">https://www.w3.org/TR/XMLHttpRequest/#events</a></p>

<p>It is just that I would like to improve my code with a progress bar on a big json file download to the app.</p>

<p>By the way, I could not find a way to log the overall $http object's functions and supported events as it returns a promise object with few info.</p>