bat
bat copied to clipboard
Querystring parameter setting operator is inconsistent
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.
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
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.