RestClient的使用

RestClient的使用
restClient.BaseUrl = new Uri(Url);

var restRequest = new RestRequest(interfaceApiConfig.Path,
interfaceApiConfig.Method)
{

   //参数
  JsonSerializer = new NewtonsoftJsonSerializer(),
  RequestFormat = DataFormat.Json
};
restRequest.AddJsonBody(new { id=id });

var rsponse = restClient.Execute(restRequest);

return GetResult(response);

posted @ 2021-09-16 10:52  vba是最好的语言  阅读(379)  评论(0编辑  收藏  举报