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.HttpUriRequestcreateHttpUriRequest(Request request) Creates a newHttpUriRequestpopulated from the givenrequest.protected static ResponsecreateResponseWithoutEntity(org.apache.http.HttpResponse result) Creates a newResponsepopulated from the given AHCresult.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.forgerock.http.spi.HttpClient
close, sendAsync
-
Constructor Details
-
AbstractHttpClient
public AbstractHttpClient()
-
-
Method Details
-
createHttpUriRequest
Creates a newHttpUriRequestpopulated 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 newResponsepopulated 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
-