在maingun API 入门的 C# 选项卡中,我找到以下代码。
public static RestResponse SendSimpleMessage() {
RestClient client = new RestClient();
client.BaseUrl = "https://api.mailgun.net/v2";
client.Authenticator =
new HttpBasicAuthenticator("api",
"key-3ax6xnjp29jd6fds4gc373sgvjxteol0");
RestRequest request = new RestRequest();
request.AddParameter("domain",
"samples.mailgun.org", ParameterType.UrlSegment);
request.Resource = "{domain}/messages";
request.AddParameter("from", "Excited User <me@samples.mailgun.org>");
request.AddParameter("to", "sergeyo@profista.com");
request.AddParameter("to", "serobnic@mail.ru");
request.AddParameter("subject", "Hello");
request.AddParameter("text", "Testing some Mailgun awesomness!");
request.Method = Method.POST;
return client.Execute(request);
}
当我用谷歌搜索类的名称时,我发现在不同的上下文中有几个对这个类的引用。但是,我似乎无法在 mailgun 网站、google 或 MSDN 上的任何地方找到 RestRequest 类的完全限定名称以找到它的文档。
任何人都可以指出这个类在哪里定义?