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 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, MultipartPayload multipartPayloads)
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, 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:
close
in interfaceAutoCloseable
- Specified by:
close
in 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:
executeAsync
in 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:
executeAsync
in 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:
executeAsync
in 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:
executeAsync
in interfaceHttpClient
-
execute
public Response execute(String userAgent, Map<String,String> headers, Verb httpVerb, String completeUrl, byte[] bodyContents) throws InterruptedException, ExecutionException, IOException
- Specified by:
execute
in interfaceHttpClient
- Throws:
InterruptedException
ExecutionException
IOException
-
execute
public Response execute(String userAgent, Map<String,String> headers, Verb httpVerb, String completeUrl, MultipartPayload multipartPayloads) throws InterruptedException, ExecutionException, IOException
- Specified by:
execute
in interfaceHttpClient
- Throws:
InterruptedException
ExecutionException
IOException
-
execute
public Response execute(String userAgent, Map<String,String> headers, Verb httpVerb, String completeUrl, String bodyContents) throws InterruptedException, ExecutionException, IOException
- Specified by:
execute
in interfaceHttpClient
- Throws:
InterruptedException
ExecutionException
IOException
-
execute
public Response execute(String userAgent, Map<String,String> headers, Verb httpVerb, String completeUrl, File bodyContents) throws InterruptedException, ExecutionException, IOException
- Specified by:
execute
in interfaceHttpClient
- Throws:
InterruptedException
ExecutionException
IOException
-
-