Package com.okta.commons.http.httpclient
Class HttpClientRequestExecutor
- java.lang.Object
-
- com.okta.commons.http.httpclient.HttpClientRequestExecutor
-
- All Implemented Interfaces:
RequestExecutor
public class HttpClientRequestExecutor extends Object implements RequestExecutor
RequestExecutorimplementation that uses the Apache HttpClient implementation to execute http requests.- Since:
- 0.5.0
-
-
Constructor Summary
Constructors Constructor Description HttpClientRequestExecutor(HttpClientConfiguration clientConfiguration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ResponseexecuteRequest(Request request)voidsetHttpClient(org.apache.http.client.HttpClient httpClient)protected byte[]toBytes(org.apache.http.HttpEntity entity)protected ResponsetoSdkResponse(org.apache.http.HttpResponse httpResponse)
-
-
-
Constructor Detail
-
HttpClientRequestExecutor
public HttpClientRequestExecutor(HttpClientConfiguration clientConfiguration)
-
-
Method Detail
-
setHttpClient
public void setHttpClient(org.apache.http.client.HttpClient httpClient)
-
executeRequest
public Response executeRequest(Request request) throws HttpException
- Specified by:
executeRequestin interfaceRequestExecutor- Throws:
HttpException
-
toBytes
protected byte[] toBytes(org.apache.http.HttpEntity entity) throws IOException- Throws:
IOException
-
toSdkResponse
protected Response toSdkResponse(org.apache.http.HttpResponse httpResponse) throws IOException
- Throws:
IOException
-
-