public class SimpleHttpClientRequest extends Object implements HttpClientRequest
HttpClientRequest
that a script can send over a HttpClient
.Constructor and Description |
---|
SimpleHttpClientRequest() |
Modifier and Type | Method and Description |
---|---|
void |
addCookie(String domain,
String field,
String value)
Add a cookie to the request.
|
void |
addHeader(String field,
String value)
Add a header field to the request.
|
void |
addQueryParameter(String field,
String value)
Add a query parameter to the request.
|
Set<HttpClientRequestCookie> |
getCookies()
Retrieve the cookies set on the request.
|
String |
getEntity()
Retrieve the entity set on the request.
|
Map<String,String> |
getHeaders()
Retrieve the headers set on the request.
|
String |
getMethod()
Retrieve the method set on the request.
|
Map<String,String> |
getQueryParameters()
Retrieve the query parameters set on the request.
|
String |
getUri()
Retrieve the URI that the request targets.
|
void |
setEntity(String entity)
Set the message entity.
|
void |
setMethod(String method)
Set the method the request will use.
|
void |
setUri(String uri)
Set the URI that the request targets.
|
public void addHeader(String field, String value)
addHeader
in interface HttpClientRequest
field
- The name of the header field to add.value
- The value of the header field.public void addQueryParameter(String field, String value)
addQueryParameter
in interface HttpClientRequest
field
- The name of the query parameter field to add.value
- The value of the query parameter field.public void addCookie(String domain, String field, String value)
addCookie
in interface HttpClientRequest
field
- The name of the cookie field to add.value
- The value of the cookie field.public void setMethod(String method)
setMethod
in interface HttpClientRequest
method
- The method to use. See http://www.w3.org/Protocols/rfc2616/rfc2616-sec5.html#sec5.1.1public void setUri(String uri)
setUri
in interface HttpClientRequest
uri
- The URI of the resource.public void setEntity(String entity)
setEntity
in interface HttpClientRequest
entity
- The entity.public Map<String,String> getHeaders()
getHeaders
in interface HttpClientRequest
public Map<String,String> getQueryParameters()
getQueryParameters
in interface HttpClientRequest
public String getMethod()
getMethod
in interface HttpClientRequest
public String getUri()
getUri
in interface HttpClientRequest
public String getEntity()
getEntity
in interface HttpClientRequest
public Set<HttpClientRequestCookie> getCookies()
getCookies
in interface HttpClientRequest
Copyright © 2010-2018, ForgeRock All Rights Reserved.