Browse Source

Minor: set request factory in Google http client constructor (#1509)

Co-authored-by: Dominique Villard <dominique.villard@orange.com>
Co-authored-by: Marvin Froeder <velo@users.noreply.github.com>
pull/1525/head
Dominique Villard 3 years ago committed by GitHub
parent
commit
cd6c57a272
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      googlehttpclient/src/main/java/feign/googlehttpclient/GoogleHttpClient.java

10
googlehttpclient/src/main/java/feign/googlehttpclient/GoogleHttpClient.java

@ -1,5 +1,5 @@
/** /**
* Copyright 2012-2020 The Feign Authors * Copyright 2012-2021 The Feign Authors
* *
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at * in compliance with the License. You may obtain a copy of the License at
@ -41,7 +41,6 @@ import feign.Response;
* "https://api.github.com"); * "https://api.github.com");
*/ */
public class GoogleHttpClient implements Client { public class GoogleHttpClient implements Client {
private final HttpTransport transport;
private final HttpRequestFactory requestFactory; private final HttpRequestFactory requestFactory;
public GoogleHttpClient() { public GoogleHttpClient() {
@ -49,8 +48,11 @@ public class GoogleHttpClient implements Client {
} }
public GoogleHttpClient(final HttpTransport transport) { public GoogleHttpClient(final HttpTransport transport) {
this.transport = transport; this(transport.createRequestFactory());
this.requestFactory = transport.createRequestFactory(); }
public GoogleHttpClient(final HttpRequestFactory requestFactory) {
this.requestFactory = requestFactory;
} }
@Override @Override

Loading…
Cancel
Save