query params are being escaped but not url encoded which makes `query` useless
See original GitHub issueSee these lines: https://github.com/ronaldschlenker/FsHttp/blob/72f78fd476ddbc1559857be2ef1ef83bc28a7b00/src/FsHttp/Helper.fs#L30-L31
You are escaping the values, but not encoding them. Above there is a function called urlEncode
which is not being used.
I am trying with fields[member]
. If passed as is, the API complains that I need to encode [
and ]
, but when I do HttpUtility.UrlEncode "fields[member]"
I get an error saying “Unknown parameter”. If I add the query param in the GET url
with HttpUtility.UrlEncode "fields[member]
then it works.
I’ll send a PR if that is ok with you.
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (6 by maintainers)
Top Results From Across the Web
Why do some query strings work even if parameters are not ...
The url parameter, http://journals.plos.org/plosone/s/file?id=wjVg/PLOSOne_formatting_sample_main_body.pdf , is not encoded. It contains ...
Read more >URL escape before inserting user data into HTML ...
We can do this because key HTML special characters are not escaped by URL encoding. Query Parameter Injection. Let's assume we have perfect...
Read more >urlencode - Manual
This function is convenient when encoding a string to be used in a query part of a URL, as a convenient way to...
Read more >urllib.parse — Parse URLs into components — Python 3.11.4 ...
The components are not broken up into smaller parts (for example, the network location is a single string), and % escapes are not...
Read more >Incomplete string escaping or encoding - CodeQL - GitHub
However, directly using the string replace method to perform escaping is notoriously error-prone. Common mistakes include only replacing the first occurrence of ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for your support!
I am using
6.0.0-preview1
and it works now.