feat: add GoogleApacheHttpTransport that uses the v2 ApacheHttpTransport implementation#1568
Conversation
chingor13
commented
Aug 26, 2020
- Introduces a separate GoogleApacheHttpTransport that return the v2 ApacheHttpTransport implementation.
- Deprecates the original GoogleApacheHttpTransport in favor of this one.
…ort implementation
|
Actually, we may want to introduce a new artifact for this (like google-api-client-apache-v2). Otherwise, we will require all users to install google-http-client-apache-v2 and the apache http client transitively. |
elharo
left a comment
There was a problem hiding this comment.
[INFO] There is 1 error reported by Checkstyle 8.23 with checkstyle.xml ruleset.
[ERROR] src/main/java/com/google/api/client/googleapis/apache/v2/GoogleApacheHttpTransport.java:[1] (javadoc) JavadocPackage: Missing package-info.java file.
| import org.apache.http.config.SocketConfig; | ||
| import org.apache.http.conn.socket.LayeredConnectionSocketFactory; | ||
| import org.apache.http.conn.ssl.SSLConnectionSocketFactory; | ||
| import org.apache.http.impl.client.HttpClientBuilder; |
There was a problem hiding this comment.
can we avoid depending on impl classes?
There was a problem hiding this comment.
Official Apache HttpClient examples that configure the clients use the impl classes: https://hc.apache.org/httpcomponents-client-4.3.x/httpclient/examples/org/apache/http/examples/client/ClientProxyAuthentication.java
...ient/src/main/java/com/google/api/client/googleapis/apache/v2/GoogleApacheHttpTransport.java
Outdated
Show resolved
Hide resolved
google-http-client already has a dependency on the Apache HttpClient library so this is not introducing a new transitive dependencies (just the google-http-client-apache-v2 artifact). |
|
cc @ckiosidis Would this work for your use-case? It adds a nearly identical class that returns the non-deprecated |
|
@chingor13 Yes, thanks for moving this forward! 👍 |
...-client/src/main/java/com/google/api/client/googleapis/apache/GoogleApacheHttpTransport.java
Outdated
Show resolved
Hide resolved
...ient/src/main/java/com/google/api/client/googleapis/apache/v2/GoogleApacheHttpTransport.java
Outdated
Show resolved
Hide resolved
...ient/src/main/java/com/google/api/client/googleapis/apache/v2/GoogleApacheHttpTransport.java
Outdated
Show resolved
Hide resolved
...-client/src/main/java/com/google/api/client/googleapis/apache/GoogleApacheHttpTransport.java
Outdated
Show resolved
Hide resolved
google-api-client/src/main/java/com/google/api/client/googleapis/apache/v2/package-info.java
Outdated
Show resolved
Hide resolved
🤖 I have created a release \*beep\* \*boop\* --- ## [1.31.0](https://www.github.com/googleapis/google-api-java-client/compare/v1.30.11...v1.31.0) (2020-11-10) ### Features * add GoogleApacheHttpTransport that uses the v2 ApacheHttpTransport implementation ([#1568](https://www.github.com/googleapis/google-api-java-client/issues/1568)) ([d0dbca7](https://www.github.com/googleapis/google-api-java-client/commit/d0dbca720479f1ca8627c58eda195857ea0b2423)) * add mtls support to GoogleNetHttpTransport and GoogleApacheHttpTransport ([#1619](https://www.github.com/googleapis/google-api-java-client/issues/1619)) ([1d8304c](https://www.github.com/googleapis/google-api-java-client/commit/1d8304c6311e910293b800ffdbf0bb6f19cf7fff)) ### Dependencies * update dependency com.google.appengine:appengine-api-1.0-sdk to v1.9.83 ([#1622](https://www.github.com/googleapis/google-api-java-client/issues/1622)) ([10bb904](https://www.github.com/googleapis/google-api-java-client/commit/10bb90441c90cb5ea7045a1ac5d39d669fad963d)) * update dependency com.google.oauth-client:google-oauth-client-bom to v1.31.2 ([#1623](https://www.github.com/googleapis/google-api-java-client/issues/1623)) ([5942561](https://www.github.com/googleapis/google-api-java-client/commit/594256120e4eb37b0f3ca386f69542b68b53d05b)) * update google-http-client to v1.38.0 ([#1620](https://www.github.com/googleapis/google-api-java-client/issues/1620)) ([bb63ded](https://www.github.com/googleapis/google-api-java-client/commit/bb63ded8846cd515c993c288728063f35e226ec5)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please).