Constructor and Description |
---|
Form()
Constructs a new, empty form object.
|
Modifier and Type | Method and Description |
---|---|
void |
appendRequestQuery(Request request)
Appends the form as additional query parameters on an existing request
URI.
|
Form |
fromRequestEntity(Request request)
Parses the URL-encoded form entity of a request and stores them in this
object.
|
Form |
fromRequestQuery(Request request)
Parses the query parameters of a request and stores them in this object.
|
Form |
fromString(String s)
Parses a URL-encoded string containing form parameters and stores them in
this object.
|
void |
toRequestEntity(Request request)
Populates a request with the necessary headers and entity for the form to
be submitted as a POST with application/x-www-form-urlencoded content
type.
|
void |
toRequestQuery(Request request)
Sets a request URI with query parameters.
|
String |
toString()
Returns this form in a URL-encoded format string.
|
add, addAll, addAll, addAll, getFirst, putSingle
public Form()
public Form fromString(String s)
s
- the URL-encoded string to parse.public Form fromRequestQuery(Request request)
request
- the request to be parsed.public void toRequestQuery(Request request)
request
- the request to set query parameters to.public void appendRequestQuery(Request request)
request
- the request to append query parameters to.public Form fromRequestEntity(Request request) throws IOException
request
- the request to be parsed.IOException
- if an I/O exception occurs.public void toRequestEntity(Request request)
request
- the request to add the form entity to.Copyright © 2014 ForgeRock AS. All rights reserved.