ericblade / mws-simple

nodejs Amazon MWS (Merchant Web Services) API in ~150 lines of code
MIT License
8 stars 5 forks source link

feeds broken since 1.0.5 #11

Closed ericblade closed 6 years ago

ericblade commented 6 years ago

commit 2f85e26a88700647b63aafd7c90ed63a6c9c8f02

feeds broken in that change. The amazon documentation isn't 100% clear about how things are expected to come in, but it would seem that it doesn't quite work this way when there is feed data.

It does seem clear from http://docs.developer.amazonservices.com/en_US/dev_guide/DG_MD5.html that they are expecting Content-Type x-www-form-url-encoded .. also see http://docs.developer.amazonservices.com/en_US/feeds/Feeds_SubmitFeed.html

The guys here seem to have got it working? but are difficult to follow:

https://stackoverflow.com/questions/40180070/amazon-mws-submitfeed-content-md5-http-header-did-not-match-the-content-md5-calc

Theoretically, we can just go back to sending the exact same request as before if there's feedContent.. but there were problems with other functions when it was sending all the requests as query strings. i'm not sure if amazon is expecting these as query strings, or form data. It seems other people use query strings, but I recall making the change to form data for a very good reason, which isn't detailed in the change log. ugh.