Skip to content
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

How can one POST application/json with this? #24

Open
Panthro opened this issue Sep 6, 2016 · 3 comments
Open

How can one POST application/json with this? #24

Panthro opened this issue Sep 6, 2016 · 3 comments

Comments

@Panthro
Copy link

Panthro commented Sep 6, 2016

I have been trying to use this plugin to post jsons to a REST api, I simply can't.

It always sends as application/x-www-form-urlencoded and tries to parse my json into params.

eg:

{
"id":1,
"name": "John Doe"
 }

becomes: id=1&name=John+Doe

@xtrembaker
Copy link

+1

@talamaska
Copy link

have you tried placing a correct header?

@xtrembaker
Copy link

Of course, at first, we we're using application/json as Header Content-Type, till we realize our API was refusing all request because it was receiving "urlencoded" data. The plugin do not care about the Content-Type we specify in the header, it always automatically transform payload as "urlencoded" data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants