我不知道是否正确传递了参数和标题。我没有回来的数据。
还向每个参数中添加了ParatmeterType.GetOrPost和Parametertype.RequestBody。
var userName = "**************";
var password = "***************";
var client = new RestClient("API/source");
client.Authenticator = new HttpBasicAuthenticator(userName, password);
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("request_token", "testrequesttoken");
request.AddParameter("tool_version", "testtoolversion");
request.AddParameter("tool_License", "testlicense");
request.AddParameter("engine_serial", "testserial");
request.AddParameter("veh_vin", "testvin");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
Console.ReadKey();
我能够进行身份验证,但没有任何数据回来。