bhushankummar / amazon-mws

Amazon MWS NodeJS Wrapper
MIT License
197 stars 78 forks source link

No throttling information being returned #35

Closed asheinfeld closed 6 years ago

asheinfeld commented 6 years ago

Every time I make a request, the Headers returned look like this:

{
  "x-mws-quota-max": "unknown",
  "x-mws-quota-remaining": "unknown",
  "x-mws-quota-resetson": "unknown",
  "x-mws-timestamp": "2018-07-12T20:29:43.558Z"
}

As you can see, it doesn't provide any throttling information.

Is there a way to fix this?

bhushankummar commented 6 years ago

@asheinfeld

asheinfeld commented 6 years ago

@bhushankumarl

http://docs.developer.amazonservices.com/en_IN/orders-2013-09-01/Orders_ListOrders.html and all the Orders API...

Can you re-open the issue?

bhushankummar commented 6 years ago

@asheinfeld

Sure.

bhushankummar commented 6 years ago

@asheinfeld

After some debugging I confirmed that, This detail is not provided by the amazon it self in headers for ListOrders call. Hence it's not possible to expose.

You can open the debugging using export DEBUG=MWS:*

res.headers { server: 'Server', date: 'Mon, 16 Jul 2018 12:21:35 GMT', 'content-type': 'text/xml', 'content-length': '13984', connection: 'close', 'x-amz-date': 'Mon, 16 Jul 2018 12:21:35 GMT', 'x-amzn-authorization': 'AAA SignedHeaders=X-Amz-Date, identity=com.amazon.aaa.MarketplaceWebServiceOrders.AndromedaControlService.amzn1.aaa.id.qhz3ylg755gkejyk5sh44qm3wy.Default/1, Signed=true, Encrypted=false, Signature=******+vfD6B1JK0XRXF/nnKKzLI=, Algorithm=HmacSHA256', 'x-mws-request-id': '****-9289-4bed-922e-f6d29d20f7d7', 'x-mws-timestamp': '2018-07-16T12:21:35.622Z', 'x-mws-response-context': 'R0v/gQv1G1QYNVYsBjsSY7xXjDUJA1IokQlkTXMzKZ3G6t8G135YBdMZC65zdaAOwKo63s+/wvA=', vary: 'Accept-Encoding,User-Agent' }  +2s

You can ask consultation on https://sellercentral.amazon.com/forums .