有兴趣分享您对 Google Ads API 的反馈吗?
注册即可获邀参与用户调研!
代理配置
Java 客户端库支持用于连接到 API 的代理设置。
设置
该库支持使用
适用于 Java 的标准代理设置。
对于 HTTPS 代理,请将代理配置设置为:
-Dhttps.proxyHost=HOST -Dhttps.proxyPort=PORT
对于 HTTP 代理(除非您提供自己的 HTTP 端点,否则不推荐使用),
将代理配置设置为:
-Dhttp.proxyHost=HOST -Dhttp.proxyPort=PORT
可在运行时同时配置 HTTP 和 HTTPS 代理。
System.setProperty("https.proxyHost", HOST);
System.setProperty("https.proxyPort", PORT);
如果更改此设置,则必须重新创建提供的所有服务客户端
上传者:GoogleAdsClient.getVersionX().createYServiceClient()
。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-10-14。
[null,null,["最后更新时间 (UTC):2024-10-14。"],[[["The Java client library enables connections to the API through proxy settings, utilizing standard Java proxy configurations."],["For HTTPS proxy connections, use `-Dhttps.proxyHost=HOST -Dhttps.proxyPort=PORT`, while HTTP proxy (less secure) uses `-Dhttp.proxyHost=HOST -Dhttp.proxyPort=PORT`."],["Both HTTP and HTTPS proxy settings can be dynamically configured at runtime using `System.setProperty()`."],["Any changes to the proxy settings require recreating service clients via `GoogleAdsClient.getVersionX().createYServiceClient()` to apply the new configuration."]]],[]]