代码如下:
var webRequest = WebRequest.Create("http://accounts.google.com/o/oauth2/token") as HttpWebRequest;
...
运行时出现错误:
The remote server returned an error: (405) Method Not Allowed.
写了一篇博客:
解决方法:
将 http 改为 https
var webRequest = WebRequest.Create("https://accounts.google.com/o/oauth2/token") as HttpWebRequest;