Do not encode parameters in RestSharp

前端 未结 5 1260
南方客
南方客 2020-12-19 13:23

I am using RestSharp to access a RubyOnRails API. As you might know, RoR likes when the parameters names are in the form model_name[property]. RestSharp, on the

5条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-19 14:14

    Since RestSharp version 106.4.0 you can just use ParameterType.QueryStringWithoutEncode in request.AddParameter() function:

            request.AddParameter("user_id", @"45454545%6565%65", ParameterType.QueryStringWithoutEncode);
    

提交回复
热议问题