Package org.forgerock.http.apache
Class AbstractHttpClient
java.lang.Object
org.forgerock.http.apache.AbstractHttpClient
- All Implemented Interfaces:
Closeable
,AutoCloseable
,HttpClient
This abstract client is used to share commonly used constants and methods
in both synchronous and asynchronous Apache HTTP Client libraries.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected org.apache.http.client.methods.HttpUriRequest
createHttpUriRequest
(Request request) Creates a newHttpUriRequest
populated from the givenrequest
.protected static Response
createResponseWithoutEntity
(org.apache.http.HttpResponse result) Creates a newResponse
populated from the given AHCresult
.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.forgerock.http.spi.HttpClient
close, sendAsync
-
Constructor Details
-
AbstractHttpClient
public AbstractHttpClient()
-
-
Method Details
-
createHttpUriRequest
Creates a newHttpUriRequest
populated from the givenrequest
. The returned message has some of its headers filtered/ignored (proxy behaviour).- Parameters:
request
- OpenIG request structure- Returns:
- AHC request structure
-
createResponseWithoutEntity
Creates a newResponse
populated from the given AHCresult
. The returned message has some of its headers filtered/ignored (proxy behaviour).- Parameters:
result
- AHC response structure- Returns:
- CHF response structure
-