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 / PUT data in readme misleading #14

Open
bbn opened this issue Jul 30, 2010 · 6 comments
Open

POST / PUT data in readme misleading #14

bbn opened this issue Jul 30, 2010 · 6 comments

Comments

@bbn
Copy link

bbn commented Jul 30, 2010

Browsing the code I was able to figure out that in order to send multiple datums for POST I had to use a syntax like

x=1&y=2

rather than something like

{"x":1,"y":2}

The latter would be cool, but seems to not be supported at the moment. The former is fine but the documentation should be changed to reflect it.

@cloudhead
Copy link
Owner

They both work actually, it depends what the server accepts. It's just raw data, so in the later case the server needs to parse it as json. http-console doesn't care what you type in there.

@bbn
Copy link
Author

bbn commented Jul 31, 2010

understood.

@bbn
Copy link
Author

bbn commented Aug 1, 2010

I'd like to humbly predict that inserting a super-brief explanation of typical formatting of POST arguments from a regular HTML web form will save other people time. I'm not the sharpest pencil in the drawer, but I'm also not atypical, and it cost me about an hour of poking around.

@cloudhead
Copy link
Owner

Good idea.

@kamweti
Copy link

kamweti commented Sep 14, 2012

Got POST with form data to work:
$ http-console localhost $ http://localhost:80/> /myapp/ $ http://localhost:80/myapp/login.php> Content-type: application/x-www-form-urlencoded $ http://localhost:80/myapp/login.php> post $ ... username=admin&password=admin

@bcaccinolo
Copy link

@bbn Thanks for the explanation cause the readme was not working for me. 👍

polotek added a commit to polotek/http-console that referenced this issue Jan 20, 2015
I made a bunch of updates to the readme to make handling cookies and request data more clear. I had trouble with it and see people complaining about in the issues.

Closes cloudhead#14
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

4 participants