Closed pjump closed 9 years ago
The issue is how curlicue always tries to interpret the request body even if the content type is
"application/json"
and not "application/x-www-form-urlencoded"
. In shouldn't be setting url_params from the body if content type (the header) is application/json. (Line No 100)
In cany case, thanks for the awesome tool. I absolutely love it.
Thanks for the report -- this is correct, if the body content-type is something else then we should ignore it for signature purposes: http://oauth.net/core/1.0a/#anchor13 Thinking about how best to deal with this.
Let me know how this works for you: https://github.com/decklin/curlicue/compare/data-not-params
It adds a curlicue option, so you have to use it in conjunction with setting the content-type header, something like
curlicue -P -- -d '{"foo": "bar"}' -H "Content-Type: application/json" http://example.com/whatever
Works great. Thanks!
I was trying to use this to create bitbucket repos via oauth.
Deletion with curlic works reliably fine, but POSTing fails. The differences between the two is POST requests have a JSON body.
I'm not sure whether it's bitbucket or curlicue that's failing here.