简体   繁体   English

使用Google的Java AdWords客户端库时是否自定义HTTP客户端?

[英]Custom http client when using google's java adwords client library?

I'm using google's java client library to create adwords campaigns. 我正在使用Google的Java 客户端库来创建adwords广告系列。 This works fine during development, but when I deploy my service to production, all our outgoing requests need to pass through our own proxy. 在开发过程中,这很好用,但是当我将服务部署到生产环境时,所有传出的请求都需要通过我们自己的代理进行传递。 Our proxy examines some of our custom http headers and forwards the request to the Internet. 我们的代理检查我们的一些自定义http标头,并将请求转发到Internet。 My questions are: 1. is it possible to use my own custom http client instead of the one that ships with the library to make the http request ? 我的问题是:1.是否可以使用我自己的自定义http客户端而不是库随附的发出http请求的客户端? 2. in case 1. is not possible, is it possible to add custom http headers to the requests made by the client? 2.如果无法使用1.,是否可以向客户的请求中添加自定义的HTTP标头?

(I have looked at the source code and have determined that there is no obvious way to plug in my own http client, and would be pleased to be proven wrong. :) ) (我查看了源代码,并确定没有明显的方法可以插入我自己的http客户端,并且很高兴被证明是错误的。:))

The sdk doesn't support it at the moment, the workaround is to use the proxySelector and add custom logic there. sdk目前不支持它,解决方法是使用proxySelector并在其中添加自定义逻辑。 docs here 这里的文档

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 将代理与Google HTTP Client Library for Java结合使用 - Using proxies with Google HTTP Client Library for Java 使用Google的Java API客户端库进行身份验证时出现IllegalArgumentException - IllegalArgumentException when authenticating using Google's Java API client library Java客户端库(AdWords)的关键字迭代器 - Keyword iterator for Java client library (AdWords) 带有Java的Google HTTP客户端库的Set-Cookie - Set-Cookie with Google HTTP Client Library for Java 用于Java的Google HTTP Client Library会抛出HttpResponseException:301已永久移动 - Google HTTP Client Library for Java throws HttpResponseException: 301 Moved Permanently 使用Google Java API客户端库更改批HTTP请求的READ TIMEOUT - Change READ TIMEOUT for a batch HTTP Request on using Google API Client Library for Java 使用Google api Java客户端时,我是否需要包括google http客户端和google oauth客户端? 如何使用gradle进行操作? - When using the google api java client, do I need to include google http client and google oauth client? How to do so using gradle? 从GAE API使用endpointscfg生成Java客户端库时出现HTTP 500错误 - HTTP 500 error when generating Java Client Library using endpointscfg from a GAE API Java:模拟 Google Api 客户端库的 HttpResponse - Java: Mock Google Api Client Library's HttpResponse 如何使用Java的HTTP客户端库设置应用程序名称? - How to set the application name using the HTTP Client Library for Java?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM