当我在Authenticating Google API with a service account with Java API中尝试代码时,我遇到了失败,需要通过代理。我发现有same question for Python。 Java客户端有什么解决方案吗?
好的,我们支持HTTP代理。
HTTP传输类有两种选择:NetHttpTransport
或ApacheHttpTransport
(基于4.0)
本文档展示了如何使用NetHttpTransport
:https://developers.google.com/bigquery/articles/gettingstartedwithjava
然后,您可以在此处设置系统属性以配置代理:http://docs.oracle.com/javase/7/docs/api/java/net/doc-files/net-properties.html#Proxies