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

Querystring parameter setting operator is inconsistent #19

Open
glkz opened this issue Apr 20, 2015 · 2 comments
Open

Querystring parameter setting operator is inconsistent #19

glkz opened this issue Apr 20, 2015 · 2 comments

Comments

@glkz
Copy link
Contributor

glkz commented Apr 20, 2015

param=value's behavior changes with http method. So user interface changes between http requests whereas the http resource is the same.

For example:

bat GET api.example.com/person/1 apiKey=smellsbad
//apiKey is in the querystring
bat PUT api.example.com/person/1 apiKey=smellsbad
//apiKey is in the request body 

Also, there is no other option to add querystring parameters to post/put/patch requests other than manually adding them to url.

I think, a consistent assign operator for querystring params would be nice. We can adopt httpie's == for this.

@astaxie
Copy link
Owner

astaxie commented Apr 21, 2015

I think Get will always send the params while not body. http://stackoverflow.com/questions/978061/http-get-with-request-body

while other will always add as the post data

@glkz
Copy link
Contributor Author

glkz commented Apr 22, 2015

I have no objection to "GET requests should not contain body" idea/convention.

However, I think a common option (like ==) to send querystring parameters for all http methods would be good.

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

2 participants