i need to set response Type as 'blob' in angular. how to set response Type for $http in angularjs? sample code for set responseType using XMLHttpRequest is provided below. i need to replace XMLHttpRequest with $http.
var oMyForm = new FormData();
oMyForm.append("js", content);
var oReq = new XMLHttpRequest({mozSystem: true});
oReq.open("POST", url, true);
oReq.responseType = "blob";
oReq.onload = function(xhr) {
};
oReq.onerror = function(xhr) {
};
oReq.send(oMyForm);