alwayswill / google-api-java-client

Automatically exported from code.google.com/p/google-api-java-client
0 stars 0 forks source link

javadocs for HttpRequestFactory use deprecated HttpRequest.headers field #266

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Version of google-api-java-client (e.g. 1.4.1-beta)?

1.5.0-beta

Describe the problem.

JavaDocs for HttpRequestFactory in 1.5.0 
(http://javadoc.google-http-java-client.googlecode.com/hg/1.5.0-beta/com/google/
api/client/http/HttpRequestFactory.html) reference the now-deprecated 
HttpRequest.headers field in the example code:

  public static HttpRequestFactory createRequestFactory(HttpTransport transport) {
    return transport.createRequestFactory(new HttpRequestInitializer() {
      public void handle(HttpRequest request) {
        request.headers.authorization = "...";
      }
    });
  }

How would you expect it to be fixed?

Change the example to:

request.getHeaders().authorization = "...";

Original issue reported on code.google.com by darkfoxp...@gmail.com on 12 Aug 2011 at 10:49

GoogleCodeExporter commented 9 years ago
Thanks for the feedback.

Original comment by yan...@google.com on 13 Aug 2011 at 2:17

GoogleCodeExporter commented 9 years ago
http://code.google.com/p/google-http-java-client/issues/detail?id=22

Original comment by yan...@google.com on 15 Aug 2011 at 3:27