Do not encode parameters in RestSharp

前端 未结 5 1258
南方客
南方客 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:02

    Update: probably doesn't work in most cases from comments.

    I found an interesting solution... Just decode the parameters you want to pass in and restsharp will encode back to what it should be. For example, I have an api key that uses %7 in it and RestSharper further encodes it. I decoded the api key and passed that into RestSharp and it seems to work!

提交回复
热议问题