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);