Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ExchangeToken() dial tcp: i/o timeout #202

Closed
fireice009 opened this issue Apr 20, 2017 · 3 comments
Closed

ExchangeToken() dial tcp: i/o timeout #202

fireice009 opened this issue Apr 20, 2017 · 3 comments

Comments

@fireice009
Copy link

在 chrome 中访问 https://api.weixin.qq.com/sns/oauth2/access_token?appid=xxx&secret=xxx&code=xxx&grant_type=authorization_code 正常。
但在代码里面调用 token, xerr := oauth2Client.ExchangeToken(code) 得到 xerr:
Get https://api.weixin.qq.com/sns/oauth2/access_token?appid=xxx&secret=xxx&code=xxx&grant_type=authorization_code: dial tcp: i/o timeout

以下命令也超时
curl -sL https://api.weixin.qq.com/sns/oauth2/access_token?appid=xxx&secret=xxx&code=xxx&grant_type=authorization_code

OS: macOS Sierra 10.12.3 (16D30)

@chanxuehong
Copy link
Owner

请问还有问题吗

@chanxuehong
Copy link
Owner

这个问题我个人认为还是你当时的环境的问题吧,不然你不会 curl 也不行,而且这块我们工作的好好的

@fireice009
Copy link
Author

系统的问题,放在线上的linux服务器跑没有问题。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants