Class OkHttpHttpClient
- java.lang.Object
-
- com.github.scribejava.httpclient.okhttp.OkHttpHttpClient
-
- All Implemented Interfaces:
com.github.scribejava.core.httpclient.HttpClient,java.io.Closeable,java.lang.AutoCloseable
public class OkHttpHttpClient extends java.lang.Object implements com.github.scribejava.core.httpclient.HttpClient
-
-
Constructor Summary
Constructors Constructor Description OkHttpHttpClient()OkHttpHttpClient(OkHttpHttpClientConfig config)OkHttpHttpClient(okhttp3.OkHttpClient client)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()com.github.scribejava.core.model.Responseexecute(java.lang.String userAgent, java.util.Map<java.lang.String,java.lang.String> headers, com.github.scribejava.core.model.Verb httpVerb, java.lang.String completeUrl, byte[] bodyContents)com.github.scribejava.core.model.Responseexecute(java.lang.String userAgent, java.util.Map<java.lang.String,java.lang.String> headers, com.github.scribejava.core.model.Verb httpVerb, java.lang.String completeUrl, com.github.scribejava.core.httpclient.MultipartPayload bodyContents)com.github.scribejava.core.model.Responseexecute(java.lang.String userAgent, java.util.Map<java.lang.String,java.lang.String> headers, com.github.scribejava.core.model.Verb httpVerb, java.lang.String completeUrl, java.io.File bodyContents)com.github.scribejava.core.model.Responseexecute(java.lang.String userAgent, java.util.Map<java.lang.String,java.lang.String> headers, com.github.scribejava.core.model.Verb httpVerb, java.lang.String completeUrl, java.lang.String bodyContents)<T> java.util.concurrent.Future<T>executeAsync(java.lang.String userAgent, java.util.Map<java.lang.String,java.lang.String> headers, com.github.scribejava.core.model.Verb httpVerb, java.lang.String completeUrl, byte[] bodyContents, com.github.scribejava.core.model.OAuthAsyncRequestCallback<T> callback, com.github.scribejava.core.model.OAuthRequest.ResponseConverter<T> converter)<T> java.util.concurrent.Future<T>executeAsync(java.lang.String userAgent, java.util.Map<java.lang.String,java.lang.String> headers, com.github.scribejava.core.model.Verb httpVerb, java.lang.String completeUrl, com.github.scribejava.core.httpclient.MultipartPayload bodyContents, com.github.scribejava.core.model.OAuthAsyncRequestCallback<T> callback, com.github.scribejava.core.model.OAuthRequest.ResponseConverter<T> converter)<T> java.util.concurrent.Future<T>executeAsync(java.lang.String userAgent, java.util.Map<java.lang.String,java.lang.String> headers, com.github.scribejava.core.model.Verb httpVerb, java.lang.String completeUrl, java.io.File bodyContents, com.github.scribejava.core.model.OAuthAsyncRequestCallback<T> callback, com.github.scribejava.core.model.OAuthRequest.ResponseConverter<T> converter)<T> java.util.concurrent.Future<T>executeAsync(java.lang.String userAgent, java.util.Map<java.lang.String,java.lang.String> headers, com.github.scribejava.core.model.Verb httpVerb, java.lang.String completeUrl, java.lang.String bodyContents, com.github.scribejava.core.model.OAuthAsyncRequestCallback<T> callback, com.github.scribejava.core.model.OAuthRequest.ResponseConverter<T> converter)
-
-
-
Constructor Detail
-
OkHttpHttpClient
public OkHttpHttpClient()
-
OkHttpHttpClient
public OkHttpHttpClient(OkHttpHttpClientConfig config)
-
OkHttpHttpClient
public OkHttpHttpClient(okhttp3.OkHttpClient client)
-
-
Method Detail
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Throws:
java.io.IOException
-
executeAsync
public <T> java.util.concurrent.Future<T> executeAsync(java.lang.String userAgent, java.util.Map<java.lang.String,java.lang.String> headers, com.github.scribejava.core.model.Verb httpVerb, java.lang.String completeUrl, byte[] bodyContents, com.github.scribejava.core.model.OAuthAsyncRequestCallback<T> callback, com.github.scribejava.core.model.OAuthRequest.ResponseConverter<T> converter)- Specified by:
executeAsyncin interfacecom.github.scribejava.core.httpclient.HttpClient
-
executeAsync
public <T> java.util.concurrent.Future<T> executeAsync(java.lang.String userAgent, java.util.Map<java.lang.String,java.lang.String> headers, com.github.scribejava.core.model.Verb httpVerb, java.lang.String completeUrl, com.github.scribejava.core.httpclient.MultipartPayload bodyContents, com.github.scribejava.core.model.OAuthAsyncRequestCallback<T> callback, com.github.scribejava.core.model.OAuthRequest.ResponseConverter<T> converter)- Specified by:
executeAsyncin interfacecom.github.scribejava.core.httpclient.HttpClient
-
executeAsync
public <T> java.util.concurrent.Future<T> executeAsync(java.lang.String userAgent, java.util.Map<java.lang.String,java.lang.String> headers, com.github.scribejava.core.model.Verb httpVerb, java.lang.String completeUrl, java.lang.String bodyContents, com.github.scribejava.core.model.OAuthAsyncRequestCallback<T> callback, com.github.scribejava.core.model.OAuthRequest.ResponseConverter<T> converter)- Specified by:
executeAsyncin interfacecom.github.scribejava.core.httpclient.HttpClient
-
executeAsync
public <T> java.util.concurrent.Future<T> executeAsync(java.lang.String userAgent, java.util.Map<java.lang.String,java.lang.String> headers, com.github.scribejava.core.model.Verb httpVerb, java.lang.String completeUrl, java.io.File bodyContents, com.github.scribejava.core.model.OAuthAsyncRequestCallback<T> callback, com.github.scribejava.core.model.OAuthRequest.ResponseConverter<T> converter)- Specified by:
executeAsyncin interfacecom.github.scribejava.core.httpclient.HttpClient
-
execute
public com.github.scribejava.core.model.Response execute(java.lang.String userAgent, java.util.Map<java.lang.String,java.lang.String> headers, com.github.scribejava.core.model.Verb httpVerb, java.lang.String completeUrl, byte[] bodyContents) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException, java.io.IOException- Specified by:
executein interfacecom.github.scribejava.core.httpclient.HttpClient- Throws:
java.lang.InterruptedExceptionjava.util.concurrent.ExecutionExceptionjava.io.IOException
-
execute
public com.github.scribejava.core.model.Response execute(java.lang.String userAgent, java.util.Map<java.lang.String,java.lang.String> headers, com.github.scribejava.core.model.Verb httpVerb, java.lang.String completeUrl, com.github.scribejava.core.httpclient.MultipartPayload bodyContents) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException, java.io.IOException- Specified by:
executein interfacecom.github.scribejava.core.httpclient.HttpClient- Throws:
java.lang.InterruptedExceptionjava.util.concurrent.ExecutionExceptionjava.io.IOException
-
execute
public com.github.scribejava.core.model.Response execute(java.lang.String userAgent, java.util.Map<java.lang.String,java.lang.String> headers, com.github.scribejava.core.model.Verb httpVerb, java.lang.String completeUrl, java.lang.String bodyContents) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException, java.io.IOException- Specified by:
executein interfacecom.github.scribejava.core.httpclient.HttpClient- Throws:
java.lang.InterruptedExceptionjava.util.concurrent.ExecutionExceptionjava.io.IOException
-
execute
public com.github.scribejava.core.model.Response execute(java.lang.String userAgent, java.util.Map<java.lang.String,java.lang.String> headers, com.github.scribejava.core.model.Verb httpVerb, java.lang.String completeUrl, java.io.File bodyContents) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException, java.io.IOException- Specified by:
executein interfacecom.github.scribejava.core.httpclient.HttpClient- Throws:
java.lang.InterruptedExceptionjava.util.concurrent.ExecutionExceptionjava.io.IOException
-
-