public class OkHttpHttpClient extends Object implements HttpClient
CONTENT_LENGTH, CONTENT_TYPE, DEFAULT_CONTENT_TYPE
Constructor and Description |
---|
OkHttpHttpClient() |
OkHttpHttpClient(okhttp3.OkHttpClient client) |
OkHttpHttpClient(OkHttpHttpClientConfig config) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
Response |
execute(String userAgent,
Map<String,String> headers,
Verb httpVerb,
String completeUrl,
byte[] bodyContents) |
Response |
execute(String userAgent,
Map<String,String> headers,
Verb httpVerb,
String completeUrl,
File bodyContents) |
Response |
execute(String userAgent,
Map<String,String> headers,
Verb httpVerb,
String completeUrl,
String bodyContents) |
<T> Future<T> |
executeAsync(String userAgent,
Map<String,String> headers,
Verb httpVerb,
String completeUrl,
byte[] bodyContents,
OAuthAsyncRequestCallback<T> callback,
OAuthRequest.ResponseConverter<T> converter) |
<T> Future<T> |
executeAsync(String userAgent,
Map<String,String> headers,
Verb httpVerb,
String completeUrl,
File bodyContents,
OAuthAsyncRequestCallback<T> callback,
OAuthRequest.ResponseConverter<T> converter) |
<T> Future<T> |
executeAsync(String userAgent,
Map<String,String> headers,
Verb httpVerb,
String completeUrl,
String bodyContents,
OAuthAsyncRequestCallback<T> callback,
OAuthRequest.ResponseConverter<T> converter) |
public OkHttpHttpClient()
public OkHttpHttpClient(OkHttpHttpClientConfig config)
public OkHttpHttpClient(okhttp3.OkHttpClient client)
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
public <T> Future<T> executeAsync(String userAgent, Map<String,String> headers, Verb httpVerb, String completeUrl, byte[] bodyContents, OAuthAsyncRequestCallback<T> callback, OAuthRequest.ResponseConverter<T> converter)
executeAsync
in interface HttpClient
public <T> Future<T> executeAsync(String userAgent, Map<String,String> headers, Verb httpVerb, String completeUrl, String bodyContents, OAuthAsyncRequestCallback<T> callback, OAuthRequest.ResponseConverter<T> converter)
executeAsync
in interface HttpClient
public <T> Future<T> executeAsync(String userAgent, Map<String,String> headers, Verb httpVerb, String completeUrl, File bodyContents, OAuthAsyncRequestCallback<T> callback, OAuthRequest.ResponseConverter<T> converter)
executeAsync
in interface HttpClient
public Response execute(String userAgent, Map<String,String> headers, Verb httpVerb, String completeUrl, byte[] bodyContents) throws InterruptedException, ExecutionException, IOException
execute
in interface HttpClient
InterruptedException
ExecutionException
IOException
public Response execute(String userAgent, Map<String,String> headers, Verb httpVerb, String completeUrl, String bodyContents) throws InterruptedException, ExecutionException, IOException
execute
in interface HttpClient
InterruptedException
ExecutionException
IOException
public Response execute(String userAgent, Map<String,String> headers, Verb httpVerb, String completeUrl, File bodyContents) throws InterruptedException, ExecutionException, IOException
execute
in interface HttpClient
InterruptedException
ExecutionException
IOException
Copyright © 2018. All rights reserved.