Closed jakeleventhal closed 8 months ago
Update: I tried doing the "Code" option on Postman and was reproducing the same error when exporting as Node.js but not with Python using the requests
library. I was also able to make it work with the Go version.
You are probably missing a few headers because here we have some custom headers. Try diagnosing it with Wireshark or Fiddler.
I am not missing headers. I tried it both manually and by exporting the request from Postman to Node.js. Like I said, the same request works with the Python version
This is my homepage https://www.upwork.com/freelancers/~01d9918b4a5391fe25 , I will help you.
We provide solutions around Amazon MWS and Advertising API's.
check www.esellerhub.com to know more about us.. We can do this easily..
I am using the reports section of Amazon's Advertising API to try to generate and download reports.
I am able to generate the reports just fine using the POST request, but when I try to use the GET request to download a report, I get an error about using multiple headers. What's strange though, is that when I use Postman to make the same exact GET request with the same headers, the request works just fine and I am able to download the data.
Here is my code:
Here is the same request in Postman (that works)
And this is the error that I get when I try to make the request using
request-promise
:What's also strange is that I am able to make other GET requests to the Amazon Advertising API without any problems. After doing some digging, I found out that the report download API route uses a redirect. The error message seems to suggest that headers/some querystring is being set in the background. There needs to be a way to disable this.