Skip to content

AddQueryParameter : Pipe character still encoded with false option #2207

Description

@ronando82

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions