public final class Request extends MessageImpl<Request>
| Constructor and Description |
|---|
Request()
Creates a new request message.
|
Request(Request request)
Creates a defensive copy of the given
request message. |
| Modifier and Type | Method and Description |
|---|---|
RequestCookies |
getCookies()
Returns the incoming request cookies.
|
Form |
getForm()
Returns a copy of the query parameters and
application/x-www-form-urlencoded entity decoded as a form. |
String |
getMethod()
Returns the method to be performed on the resource.
|
MutableUri |
getUri()
Returns the fully-qualified URI of the resource being accessed.
|
Request |
setEntity(Object o)
Sets the content of the entity to the provided value.
|
Request |
setMethod(String method)
Sets the method to be performed on the resource.
|
Request |
setUri(String uri)
Sets the fully-qualified string URI of the resource being accessed.
|
Request |
setUri(URI uri)
Sets the fully-qualified URI of the resource being accessed.
|
Request |
setVersion(String version)
Sets the protocol version.
|
close, getEntity, getHeaders, getVersionpublic Request()
public Request(Request request) throws IOException
request message.request - request to be copiedIOException - when entity cannot be clonedpublic RequestCookies getCookies()
public Form getForm()
application/x-www-form-urlencoded entity decoded as a form.
Modifications to the returned form are not reflected in this request.application/x-www-form-urlencoded entity as a form.public String getMethod()
public MutableUri getUri()
public Request setEntity(Object o)
MessageContent-Length header, overwriting any existing header.
This method is intended mostly as a convenience method within scripts. The parameter will be handled depending on its type as follows:
BranchingInputStream - equivalent to calling
Entity.setRawContentInputStream(org.forgerock.http.io.BranchingInputStream)
byte[] - equivalent to calling Entity.setBytes(byte[])
String - equivalent to calling Entity.setString(java.lang.String)
Object - equivalent to calling Entity.setJson(java.lang.Object).
Note: This method does not attempt to encode the entity based-on any
codings specified in the Content-Encoding header.
o - The object whose value should be stored in the entity.public Request setMethod(String method)
method - The method to be performed on the resource.public Request setUri(String uri) throws URISyntaxException
uri - The fully-qualified string URI of the resource being accessed.URISyntaxException - if the given URI string is not well-formed.public Request setUri(URI uri)
uri - The fully-qualified URI of the resource being accessed.Copyright © 2025 Open Identity Platform Community. All rights reserved.