Skip to content

Commit 673d732

Browse files
Glen K. Petersonmattwhisenhunt
authored andcommitted
Updated comments which looked outdated to me.
The example here: https://developers.google.com/identity/sign-in/web/backend-auth Shows: new GoogleIdTokenVerifier.Builder(transport, jsonFactory) But doesn't show where the transport or jsonFactory come from. It was easy to find the right JSON library from the left-nav here: https://developers.google.com/api-client-library/java/google-http-java-client/setup But it was not so easy to find a HTTPTransport from that page or from the Javadoc here: https://github.com/google/google-http-java-client/blob/dev/google-http-client/src/main/java/com/google/api/client/http/HttpTransport.java Both those sources suggested that plain old Java projects use com.google.api.client.javanet.NetHttpTransport which I could not find. But com.google.api.client.googleapis.javanet.GoogleNetHttpTransport was already included in the google-api-cient and worked for me! The suggestion to use GoogleNetHttpTransport came from here: https://developers.google.com/google-apps/tasks/quickstart/java#step_3_configure_the_project_build I hope this is helpful.
1 parent 356bf78 commit 673d732

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

google-http-client/src/main/java/com/google/api/client/http/HttpTransport.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,10 @@
5252
* </li>
5353
* <li>Other Java environments
5454
* <ul>
55+
* <li>{@code com.google.api.client.googleapis.javanet.GoogleNetHttpTransport} is included in
56+
* google-api-cient 1.22.0, so easy to include.</li>
5557
* <li>{@code com.google.api.client.javanet.NetHttpTransport} is based on the HttpURLConnection
56-
* built into the Java SDK, so it is normally the preferred choice.</li>
58+
* built into the Java SDK, so it used to be the preferred choice.</li>
5759
* <li>{@code com.google.api.client.apache.ApacheHttpTransport} is a good choice for users of the
5860
* Apache HTTP Client, especially if you need some of the configuration options available in that
5961
* library.</li>

0 commit comments

Comments
 (0)