How to add json to RestSharp POST request

前端 未结 3 1817
日久生厌
日久生厌 2021-01-01 19:22

I have the following JSON string that is passed into my c# code as a string parameter - AddLocation(string locationJSON):

{\"accountId\":\"57abb4d6aad4\",\"a         


        
3条回答
  •  生来不讨喜
    2021-01-01 19:52

    I've ran into this problem as well. Try something like this instead of AddJsonBody.

    request.AddParameter("application/json", locationJSON, ParameterType.RequestBody);
    

提交回复
热议问题