In my AngularJS application I have to request via HTTP POST for a pdf report.
The response is an application/octet-stream, containing the pdf-file.()
My angular call looks like this:
$http.post($rootScope.HostPath + '/report',{ param1:value, param2:value }).
then(function success(response) {
//magic should happen here :(
},function error(response) {
console.log("Error Code : " + response.status );
});
}
How can I get the PDF out of this response javascript variable or is it possible to forward the response directly to the browser.
When I request with Postman or other tools, a download dialog pops up immediately. I've tried a lot of different solutions from stackoverflow but non of them are working in my case.