You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
i use AddQueryParameter with false attribute to prevent encoding my string but it doesn't work.
Example : .AddQueryParameter("ids", "in:001|116", false);
To Reproduce
varclientRest=newRestClient("http://xxx.yyy");stringresource= "/v1/xxxx/;
var request=newRestRequest(resource,Method.Get).AddHeader("Accept","application/json").AddHeader("x-api-key","myapikey")**.AddQueryParameter("ids","in:001|116",false);**varresponseRest= clientRest.GetAsync<string>(request).Result;
the transmitted parameter is: ids=in:001**%7C**116
For example it's work with a slash / instead a pipe character |
.AddQueryParameter("ids", "in:001/116", false);
the transmitted parameter is: ids=in:001/C116
Expected behavior
i would expect not encoding the pipe character
Desktop (please complete the following information):
OS: windows 11
.NET version 4.8
Version 111.1.0
The text was updated successfully, but these errors were encountered:
However, what I found now is that the Uri object encodes the pipe character. So, the actual URI values in both expected and actual vars in the test contain the same string with encoded pipe char, where the original URL string property for both of them contain non-encoded values.
I fixe in my PR but for .NET < 6 the code uses an obsolete Uri ctor. It works, just hoping they won't remove it.
Describe the bug
i use AddQueryParameter with false attribute to prevent encoding my string but it doesn't work.
Example : .AddQueryParameter("ids", "in:001|116", false);
To Reproduce
the transmitted parameter is:
ids=in:001**%7C**116
For example it's work with a slash
/
instead a pipe character|
the transmitted parameter is:
ids=in:001/C116
Expected behavior
i would expect not encoding the pipe character
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: