Class JDKHttpClient
- java.lang.Object
-
- com.github.scribejava.core.httpclient.jdk.JDKHttpClient
-
- All Implemented Interfaces:
HttpClient,Closeable,AutoCloseable
public class JDKHttpClient extends Object implements HttpClient
-
-
Field Summary
-
Fields inherited from interface com.github.scribejava.core.httpclient.HttpClient
CONTENT_LENGTH, CONTENT_TYPE, DEFAULT_CONTENT_TYPE
-
-
Constructor Summary
Constructors Constructor Description JDKHttpClient()JDKHttpClient(JDKHttpClientConfig clientConfig)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Responseexecute(String userAgent, Map<String,String> headers, Verb httpVerb, String completeUrl, byte[] bodyContents)Responseexecute(String userAgent, Map<String,String> headers, Verb httpVerb, String completeUrl, MultipartPayload multipartPayloads)Responseexecute(String userAgent, Map<String,String> headers, Verb httpVerb, String completeUrl, File bodyContents)Responseexecute(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, MultipartPayload 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)
-
-
-
Constructor Detail
-
JDKHttpClient
public JDKHttpClient()
-
JDKHttpClient
public JDKHttpClient(JDKHttpClientConfig clientConfig)
-
-
Method Detail
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
executeAsync
public <T> Future<T> executeAsync(String userAgent, Map<String,String> headers, Verb httpVerb, String completeUrl, byte[] bodyContents, OAuthAsyncRequestCallback<T> callback, OAuthRequest.ResponseConverter<T> converter)
- Specified by:
executeAsyncin interfaceHttpClient
-
executeAsync
public <T> Future<T> executeAsync(String userAgent, Map<String,String> headers, Verb httpVerb, String completeUrl, MultipartPayload bodyContents, OAuthAsyncRequestCallback<T> callback, OAuthRequest.ResponseConverter<T> converter)
- Specified by:
executeAsyncin interfaceHttpClient
-
executeAsync
public <T> Future<T> executeAsync(String userAgent, Map<String,String> headers, Verb httpVerb, String completeUrl, String bodyContents, OAuthAsyncRequestCallback<T> callback, OAuthRequest.ResponseConverter<T> converter)
- Specified by:
executeAsyncin interfaceHttpClient
-
executeAsync
public <T> Future<T> executeAsync(String userAgent, Map<String,String> headers, Verb httpVerb, String completeUrl, File bodyContents, OAuthAsyncRequestCallback<T> callback, OAuthRequest.ResponseConverter<T> converter)
- Specified by:
executeAsyncin interfaceHttpClient
-
execute
public Response execute(String userAgent, Map<String,String> headers, Verb httpVerb, String completeUrl, byte[] bodyContents) throws InterruptedException, ExecutionException, IOException
- Specified by:
executein interfaceHttpClient- Throws:
InterruptedExceptionExecutionExceptionIOException
-
execute
public Response execute(String userAgent, Map<String,String> headers, Verb httpVerb, String completeUrl, MultipartPayload multipartPayloads) throws InterruptedException, ExecutionException, IOException
- Specified by:
executein interfaceHttpClient- Throws:
InterruptedExceptionExecutionExceptionIOException
-
execute
public Response execute(String userAgent, Map<String,String> headers, Verb httpVerb, String completeUrl, String bodyContents) throws InterruptedException, ExecutionException, IOException
- Specified by:
executein interfaceHttpClient- Throws:
InterruptedExceptionExecutionExceptionIOException
-
execute
public Response execute(String userAgent, Map<String,String> headers, Verb httpVerb, String completeUrl, File bodyContents) throws InterruptedException, ExecutionException, IOException
- Specified by:
executein interfaceHttpClient- Throws:
InterruptedExceptionExecutionExceptionIOException
-
-