如题:
我对接一个云物联网平台,有一个rest接口是get类型的请求,但是要求在body中传送接json格式的参数
我使用RestSharp,使用request.AddJsonBody但是给我返回一个"ErrorMessage": "Http verb GET does not support body",
var client = new RestClient(url);
var request = new RestRequest(Method.GET);
request.AddHeader("cache-control", "no-cache");
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Host", "****");
request.AddHeader("Authorization", ******************);
request.AddHeader("tlinkAppId", clientId);
request._AddJsonBody_(new { userId = userId, sensorId = sensorId });