restclient.el icon indicating copy to clipboard operation
restclient.el copied to clipboard

line for url parameters?

Open titaniumbones opened this issue 6 years ago • 3 comments

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!

titaniumbones avatar Nov 05 '18 15:11 titaniumbones

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

pashky avatar Nov 05 '18 15:11 pashky

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.

shaleh avatar Nov 24 '18 17:11 shaleh

Request .el also does something similar.

titaniumbones avatar Nov 24 '18 17:11 titaniumbones