bat icon indicating copy to clipboard operation
bat copied to clipboard

Querystring parameter setting operator is inconsistent

Open glkz opened this issue 9 years ago • 2 comments

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.

glkz avatar Apr 20 '15 12:04 glkz

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

astaxie avatar Apr 21 '15 14:04 astaxie

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.

glkz avatar Apr 22 '15 06:04 glkz