我正在尝试使用RestSharp编码示例以连接到MailGun.在下面的代码中,请参阅:
client.Authenticator = new HttpBasicAuthenticator("XXX","key-yyyyyyyyyyyyyyyyyyyyyyy");
Run Code Online (Sandbox Code Playgroud)
有什么问题HttpBasicAuthenticator?VisualStudio说:
严重级代码描述项目文件行错误CS0246找不到类型或命名空间名称'HttpBasicAuthenticator'(您是否缺少using指令或程序集引用?)xTest_MailGun
注意:Visual Studio2015社区; RestSharp 105.2.3
这是代码:
RestClient client = new RestClient();
client.BaseUrl = new Uri("https://api.mailgun.net/v3");
client.Authenticator = new HttpBasicAuthenticator("XXX","key-yyyyyyyyyy");
RestRequest request = new RestRequest();
Run Code Online (Sandbox Code Playgroud) restsharp ×1