1
I was reading in the MDN documentation that it is possible to get an answer Blob through ajax, according to the code below:
var oReq = new XMLHttpRequest();
oReq.open("GET", "/myfile.png", true);
oReq.responseType = "blob";
oReq.onload = function(oEvent) {
var blob = oReq.response;
// ...
};
oReq.send()
I liked the idea and would like to know if it is possible to get an answer Blob also through the $http.get angular.
I know by default, Angularjs is configured to send and receive application/json, but would like to know if there is somewhere to set up receiving Blob.
You don’t need the
'config', actually. I can set{ responseType: 'blob' }straightforward– Wallace Maxters
@Wallacemaxters understood, did not imagine, I think I may have read wrong :) ... I will adjust.
– Guilherme Nascimento