在the getting started of maingun API C#的標籤,我發現下面的代碼。RestRequest類在哪裏?
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 <[email protected]>");
request.AddParameter("to", "[email protected]");
request.AddParameter("to", "[email protected]");
request.AddParameter("subject", "Hello");
request.AddParameter("text", "Testing some Mailgun awesomness!");
request.Method = Method.POST;
return client.Execute(request);
}
當我谷歌的類的名稱,我發現在不同的上下文中這個類的幾個引用。不過,我似乎無法找到RestRequest類的完全限定名mailgun網站上的任何地方,谷歌或MSDN找到它的文檔。
任何人都可以指出的是定義這個類在哪裏?
您需要此庫:http://restsharp.org/ – MUG4N
不知道爲什麼Mailgun不會將其添加到自己的文檔中。 –