Class SimpleHttpClientRequest
java.lang.Object
org.forgerock.http.client.request.SimpleHttpClientRequest
- All Implemented Interfaces:
HttpClientRequest
A basic implementation of
HttpClientRequest that a script can send over a HttpClient.- Since:
- 12.0.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a cookie to the request.voidAdd a header field to the request.voidaddQueryParameter(String field, String value) Add a query parameter to the request.Retrieve the cookies set on the request.Retrieve the entity set on the request.Retrieve the headers set on the request.Retrieve the method set on the request.Retrieve the query parameters set on the request.getUri()Retrieve the URI that the request targets.voidSet the message entity.voidSet the method the request will use.voidSet the URI that the request targets.
-
Constructor Details
-
SimpleHttpClientRequest
public SimpleHttpClientRequest()
-
-
Method Details
-
addHeader
Add a header field to the request.- Specified by:
addHeaderin interfaceHttpClientRequest- Parameters:
field- The name of the header field to add.value- The value of the header field.
-
addQueryParameter
Add a query parameter to the request.- Specified by:
addQueryParameterin interfaceHttpClientRequest- Parameters:
field- The name of the query parameter field to add.value- The value of the query parameter field.
-
addCookie
Add a cookie to the request.- Specified by:
addCookiein interfaceHttpClientRequestfield- The name of the cookie field to add.value- The value of the cookie field.
-
setMethod
Set the method the request will use.- Specified by:
setMethodin interfaceHttpClientRequest- Parameters:
method- The method to use. See http://www.w3.org/Protocols/rfc2616/rfc2616-sec5.html#sec5.1.1
-
setUri
Set the URI that the request targets.- Specified by:
setUriin interfaceHttpClientRequest- Parameters:
uri- The URI of the resource.
-
setEntity
Set the message entity.- Specified by:
setEntityin interfaceHttpClientRequest- Parameters:
entity- The entity.
-
getHeaders
Retrieve the headers set on the request.- Specified by:
getHeadersin interfaceHttpClientRequest- Returns:
- The headers set on the request.
-
getQueryParameters
Retrieve the query parameters set on the request.- Specified by:
getQueryParametersin interfaceHttpClientRequest- Returns:
- The query parameters set on the request.
-
getMethod
Retrieve the method set on the request.- Specified by:
getMethodin interfaceHttpClientRequest- Returns:
- The method set on the request.
-
getUri
Retrieve the URI that the request targets.- Specified by:
getUriin interfaceHttpClientRequest- Returns:
- The URI that the request targets.
-
getEntity
Retrieve the entity set on the request.- Specified by:
getEntityin interfaceHttpClientRequest- Returns:
- The entity set on the request.
-
getCookies
Retrieve the cookies set on the request.- Specified by:
getCookiesin interfaceHttpClientRequest- Returns:
- The cookies set on the request.
-