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

POST data broken? #48

Closed
somebehemoth opened this issue Feb 10, 2017 · 4 comments
Closed

POST data broken? #48

somebehemoth opened this issue Feb 10, 2017 · 4 comments

Comments

@somebehemoth
Copy link

Awesome tool! I have a question. The following request returns HTTP status code 415:
wuzz -X POST -d "name=request-size-limiting" http://localhost:8001/apis/mockbin/plugins/

Whereas the following curl command works as expected against the same API:
curl -X POST --url http://localhost:8001/apis/mockbin/plugins/ --data "name=request-size-limiting"

I've tried various permutations of the POST data without success. Is there any way to see the actual request that wuzz is making (I am curious to inspect the format of POST data)? I've tried building this request in wuzz UI with the same 415 response.

Again, this tool is awesome. Thank you for building wuzz!

@asciimoo
Copy link
Owner

@somebehemoth probably your webapp requires correct content-type header to accept post data.
Try to add -H 'Content-Type: application/x-www-form-urlencoded' to the request

@somebehemoth
Copy link
Author

@asciimoo Thank you, that works exactly as expected.

@Benaiah
Copy link
Contributor

Benaiah commented Feb 10, 2017

@asciimoo should we set the Content-Type: application/x-www-form-urlencoded by default on POST requests, at least when setting from the command line? The given example seems to indicate that cURL does this, so we might want to emulate that behavior.

If not, this issue should be good to close.

@asciimoo
Copy link
Owner

@asciimoo should we set the Content-Type: application/x-www-form-urlencoded by default on POST requests, at least when setting from the command line?

Yes, this is definitely a good idea, I'll do it.

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