1

这个简单的 POST 请求给我带来了很多麻烦。这是我的代码:

monGoose := WebClient(`https://accounts.google.com/o/oauth2/token/`)
monGoose.postForm(["code":mongoosetoken_string, "redirect_uri":redirect_string, "client_id":client_id_string, "client_secret":client_secret_string, "scope":"", "grant_type":"authorization_code"])
echo(monGoose.resStr)

它只是向https://accounts.google.com/o/oauth2/token/设置一个网络请求,然后根据 OAuth 2.0 规范发布其他数据。但是,这一直没有返回任何有用的东西,只是一个 404 代码。任何提示或指示?有什么非常明显的事情表明我做错了吗?对不起,如果它太模糊了,我只是很迷茫。

4

1 回答 1

0

我修好了它!它需要是

https://accounts.google.com/o/oauth2/token 

不是

https://accounts.google.com/o/oauth2/token/
于 2014-12-03T01:58:20.467 回答