Skip to content
This repository has been archived by the owner on Sep 28, 2021. It is now read-only.

Commit

Permalink
remove need for HttpClientProvider
Browse files Browse the repository at this point in the history
  • Loading branch information
mattnworb committed May 3, 2016
1 parent ffbd53d commit 051e90f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 42 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

import com.spotify.apollo.environment.IncomingRequestAwareClient;

import com.google.inject.Inject;
import com.squareup.okhttp.MediaType;
import com.squareup.okhttp.OkHttpClient;
import com.squareup.okhttp.Request;
Expand All @@ -32,6 +31,8 @@
import java.util.concurrent.CompletionStage;
import java.util.concurrent.TimeUnit;

import javax.inject.Inject;

import okio.ByteString;

class HttpClient implements IncomingRequestAwareClient {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,13 @@
import com.spotify.apollo.environment.ClientDecorator;
import com.spotify.apollo.environment.IncomingRequestAwareClient;

import javax.inject.Inject;

class HttpClientDecorator implements ClientDecorator {

private final HttpClient httpClient;

@Inject
HttpClientDecorator(HttpClient httpClient) {
this.httpClient = httpClient;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

public class HttpClientModule extends AbstractApolloModule {

HttpClientModule() {
private HttpClientModule() {
}

public static ApolloModule create() {
Expand All @@ -40,7 +40,7 @@ protected void configure() {
Multibinder.newSetBinder(binder(), ClientDecorator.class)
.addBinding().toProvider(HttpClientDecoratorProvider.class);

bind(HttpClient.class).toProvider(HttpClientProvider.class);
bind(HttpClient.class);
bind(OkHttpClient.class).toProvider(OkHttpClientProvider.class);
}

Expand Down

This file was deleted.

0 comments on commit 051e90f

Please sign in to comment.