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

HttpHost的设置 #56

Open
spencer-live opened this issue Nov 9, 2017 · 1 comment
Open

HttpHost的设置 #56

spencer-live opened this issue Nov 9, 2017 · 1 comment

Comments

@spencer-live
Copy link

服务器禁止直接访问外网, 需要配置代理,未在代码中找到统一设置位置。辛苦作者看下~

@howareyouo
Copy link

howareyouo commented Jun 20, 2019

@borball
同样的问题, 项目里需要代理微信接口做自动化测试.

我把 WxClientAccessTokenHolder 创建 HttpCleint 的代码改成这样了:

httpClient = HttpClients.createDefault();
===>
httpClient = HttpClients.createSystem();

HttpClients.createSystem() 会读取系统的代理设置, 这样我可以返回 Mock 数据

或者提供一种方式可以指定自己配置的 httpClient

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

No branches or pull requests

3 participants