pashky / restclient.el

HTTP REST client tool for emacs
1.98k stars 160 forks source link

line for url parameters? #199

Open titaniumbones opened 5 years ago

titaniumbones commented 5 years ago

I feel llike i'm missing something obvious, but I am not able to add query parameters to a GET request url except by including them in the initial request.

So, for instance:

GET https://q.utoronto.ca/api/v1/courses/64706/users?search_term=Matt
Authorization: Bearer XXXXXXXXXXXXXXXXXXX

works fine, but if I want to add the search term elsewhere, I don't see how to do it. In various issues reported here I see something like this:

GET https://q.utoronto.ca/api/v1/courses/64706/users
Authorization: Bearer XXXXXXXXXXXXXXXXXX
search_term=Matt

But that's not working for me. Am I missing something fundamental? Thank you!

pashky commented 5 years ago

Yes, that’s how HTTP works. GET usually doesn’t have payload and all parameters can go only into URL.

shaleh commented 5 years ago

True. However, you could emulate https://httpie.org/doc#querystring-parameters and allow for the parameters to be added separately. This can lead to better readability if there are a bunch of parameters.

titaniumbones commented 5 years ago

Request .el also does something similar.