I need to set the response type as "blob" in angular. How to set Type response for $ http in angularjs? Sample code for the responseType set using XMLHttpRequest is given 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);
anfas source share