我使用下面的代码访问 Parse.com 上的 Book 类
public void GetBook()
{
string RequestString = "https://api.parse.com/1/classes/Book";
string ApplicationId = "my Application ID";
string RestApiKey = "my REST API Key";
WebRequest webRequest = WebRequest.Create(RequestString);
NetworkCredential streetCred = new NetworkCredential(ApplicationId, RestApiKey);
webRequest.Credentials = streetCred;
webRequest.Method = "GET";
webRequest.Timeout = 100000;
HttpWebResponse b = (HttpWebResponse)webRequest.GetResponse();
}
这总是会导致 401 Unauthorized 响应。我究竟做错了什么 ?