-
Notifications
You must be signed in to change notification settings - Fork 109
postJSON's Content-Type #17
Comments
Does .post() do what you want it to? Your right about the header, it should have been application/json. |
Here I've got a similar problem, too. I use So maybe adding a content type to Update: I found that in my case, only adding |
The spec says the params are signed if the content type is single part and url-form-encoded. I dont think application/json meets both those. I could be wrong but i'll revert the change for the time being. On 29 Jul 2011, at 02:40, zhusee2reply@reply.github.com wrote:
|
Yeah, you're right about the spec. Thanks for the explanation. |
Im going to close this for the time being |
I tried to use postJSON() to post something to Plurk ( http://www.plurk.com ) with OAuth ( http://www.plurk.com/API/ ) but get the response "function arguments invalid. (2 missing, 0 additional)" .
So I checked the http request ( see https://lh4.googleusercontent.com/-6QJVff5Rlvw/TiUEOH-0wnI/AAAAAAAADBo/9RSSy9gpKJg/s912/postJSON-2.png ) and it's because postJSON() send the wrong content-type "text/plain" , can I use postJSON() with content-type = 'application/x-www-form-urlencoded' or must use oauth.request() to do what I want to do ?
=== code as bellow ===
$( '#plurkAdd' ).click( function() {
The text was updated successfully, but these errors were encountered: