-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Send PUT requests payload with the request body and not as query params #130
Comments
just found a fork with an attempt to handle this issue vbyno@7f433c9 I am trying a very similar approach but unfortunately Etsy API keeps returning me |
@vbyno did you have the same Etsy API error |
another attempt here saurabhs-tech@6d0e99b this approach works without @saurabhs-tech does it works for you when you update inventories? |
alright, thanks everybody for the ideas and implementations I figured out a working solution zibbet/etsy@master...zibbet:send_put_request_payloads_with_body |
@paxer , If I remember correctly, my approach works because of JSON headers I'm adding to the request. As I see, in your last solution you also add |
We have an issue when a customer (via OAuth) trying to update his inventory via Etsy API, we call it like this
inventory_data
hash could be pretty big for some listings with lots ofproducts
andofferings
and Etsy API returns an error from time to timeEtsy support said that we need to send a payload as a request body to avoid this error.
I am digging in to the library code and I see this is happening because params are sent as URL query and not as a request body.
https://github.com/kytrinyx/etsy/blob/master/lib/etsy/secure_client.rb#L76
but the low-level client actually supports body as a param
this is form OAuth AccessToken library which secure_client.rb calling
I've tried to modify the library to send params as a body, following the similar pattern in
with post_multipart
method https://github.com/kytrinyx/etsy/blob/master/lib/etsy/secure_client.rb#L84but no matter what I do I always getting an error from Etsy
oauth_problem=signature_invalid
My current attempt is
body here is
@parameters.to_json
string and endpoint - is a path without query string.Has anyone run into the same problem?
The text was updated successfully, but these errors were encountered: