-
Notifications
You must be signed in to change notification settings - Fork 839
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
URL params should auto-encode/decode #138
Comments
Hmm. URL params are automatically urlencoded at the time of OAuth generation and request sending. Switching between the encoded and the unencoded parts is tricky because you won't know what exactly you are editing. Also Postman won't know whether you are writing something which is already urlencoded. |
I think to solve this you can introduce a few simple rules. Namely, the URL text box should always validate as a URL. OAuth generation should just chop off the query string from the encoded URL and use that; no problem there. If one wants to edit encoded parameters, he should edit the raw URL and type in those encodings complete with the Advanced REST Client does it in a less restrictive way than this proposal by letting the user decide when to encode/decode with "encode all params" and "decode all params" buttons. The way I normally work in ARC is to paste in a properly encoded URL into the text box, then open its params editor and decode all, edit/add what I wish, re-encode all, and send that request. I'd prefer a REST client to give me a sane way of handling URL param editing, since that's the majority of the work that I'm doing in the REST client. I have a feeling that wanting to edit query-string params in their encoded state is the exceptional case. |
Now that I've started using the environments and tokens, things get slightly more complicated here. Also, there's the trouble of having certain encoded characters that can't easily be represented in a raw form in a text box, e.g. %00. |
I saw the ARC implementation and that I think is one way to do it. Advantage of not having the URL as fully encoded is that I can just work with the URL text field, make changes and fire a request. I believe this is what a lot of people would use in their workflow. |
It's not clear to me whether URL params are automatically URI encoded or not here.
When I open the URL params (or when I edit the raw request URL) it should automatically decode URL params. I should be able to edit these as normal and the request URL field should automatically update with the encoded values.
This is tricky, I know, because there are multiple variants of URL encodings for parameters. So perhaps a drop-down to select the standard would be best, e.g. some prefer '+' yet others prefer '%20'.
Regardless, I shouldn't have to be typing out encoding sequences myself. It gets to be a pain to try to remember which characters are URL-unfriendly and need to be encoded.
The text was updated successfully, but these errors were encountered: