Recently I have a faced a peculiar problem while doing some development involving some interaction with Node Web-API and AngularJS front-end application. I have written an NodeJS Web-API that hits another ASP.NET Web Service and gets some pdf data. Which does the job quite well.
From the picture we can easily see that it responds while being hit as a post call from the front end. Though it just serves data to the calling application, I have made it a POST API because if I do the same things in a GET API the file served to the front-end calling application get a corrupted PDF file with bigger size. Why $http.get() call gets corrupted data when $http.post() gets the file intact? Can anyone have in-depth idea about it?