📜  restclient 基本身份验证 c# 代码示例

📅  最后修改于: 2022-03-11 14:49:19.190000             🧑  作者: Mango

代码示例1
var client = new RestClient("http://yoururl.com");
client.Authenticator = new HttpBasicAuthenticator(userName, password);

var request = new RestRequest("resource", Method.GET);
client.Execute(request);