public final class HttpRequest extends Object
| Modifier and Type | Field and Description |
|---|---|
static Map<String,List<String>> |
EMPTY_PARAMETERS |
| Constructor and Description |
|---|
HttpRequest(String requestURL)
Deprecated.
Not providing a queryString can cause HTTP Redirect binding to fail.
|
HttpRequest(String requestURL,
Map<String,List<String>> parameters)
Deprecated.
Not providing a queryString can cause HTTP Redirect binding to fail.
|
HttpRequest(String requestURL,
Map<String,List<String>> parameters,
String queryString)
Creates a new HttpRequest.
|
HttpRequest(String requestURL,
String queryString)
Creates a new HttpRequest.
|
| Modifier and Type | Method and Description |
|---|---|
HttpRequest |
addParameter(String name,
String value) |
boolean |
equals(Object o) |
String |
getEncodedParameter(String name)
Return an url encoded get parameter value
Prefer to extract the original encoded value directly from queryString since url
encoding is not canonical.
|
String |
getEncodedParameter(String name,
String defaultValue)
Return an url encoded get parameter value
Prefer to extract the original encoded value directly from queryString since url
encoding is not canonical.
|
String |
getParameter(String name) |
Map<String,List<String>> |
getParameters() |
List<String> |
getParameters(String name) |
String |
getRequestURL()
The URL the client used to make the request.
|
int |
hashCode() |
HttpRequest |
removeParameter(String name) |
String |
toString() |
@Deprecated public HttpRequest(String requestURL)
requestURL - the request URL (up to but not including query parameters)NullPointerException - if requestURL is nullpublic HttpRequest(String requestURL, String queryString)
requestURL - the request URL (up to but not including query parameters)queryString - string that is contained in the request URL after the path@Deprecated public HttpRequest(String requestURL, Map<String,List<String>> parameters)
requestURL - the request URL (up to but not including query parameters)parameters - the request query parametersNullPointerException - if any of the parameters is nullpublic HttpRequest(String requestURL, Map<String,List<String>> parameters, String queryString)
requestURL - the request URL (up to but not including query parameters)parameters - the request query parametersqueryString - string that is contained in the request URL after the pathNullPointerException - if any of the parameters is nullpublic HttpRequest addParameter(String name, String value)
name - the query parameter namevalue - the query parameter valueNullPointerException - if any of the parameters is nullpublic HttpRequest removeParameter(String name)
name - the query parameter nameNullPointerException - if any of the parameters is nullpublic String getRequestURL()
public String getParameter(String name)
name - the query parameter namepublic List<String> getParameters(String name)
name - the query parameter namepublic Map<String,List<String>> getParameters()
public String getEncodedParameter(String name)
name - public String getEncodedParameter(String name, String defaultValue)
name - defaultValue - Copyright © 2019. All rights reserved.