java.lang.Object
org.codelibs.saml2.core.http.HttpRequest
Framework-agnostic representation of an HTTP request.
- Since:
- 2.0.0
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionHttpRequest(String requestURL) Deprecated.Not providing a queryString can cause HTTP Redirect binding to fail.HttpRequest(String requestURL, String queryString) Creates a new HttpRequest.Deprecated.Not providing a queryString can cause HTTP Redirect binding to fail.Creates a new HttpRequest. -
Method Summary
Modifier and TypeMethodDescriptionaddParameter(String name, String value) booleangetEncodedParameter(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.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.getParameter(String name) getParameters(String name) The URL the client used to make the request.inthashCode()removeParameter(String name) toString()
-
Field Details
-
EMPTY_PARAMETERS
-
-
Constructor Details
-
HttpRequest
Deprecated.Not providing a queryString can cause HTTP Redirect binding to fail.Creates a new HttpRequest.- Parameters:
requestURL- the request URL (up to but not including query parameters)
-
HttpRequest
Creates a new HttpRequest.- Parameters:
requestURL- the request URL (up to but not including query parameters)queryString- string that is contained in the request URL after the path
-
HttpRequest
Deprecated.Not providing a queryString can cause HTTP Redirect binding to fail.Creates a new HttpRequest.- Parameters:
requestURL- the request URL (up to but not including query parameters)parameters- the request query parameters
-
HttpRequest
Creates a new HttpRequest.- Parameters:
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 path
-
-
Method Details
-
addParameter
- Parameters:
name- the query parameter namevalue- the query parameter value- Returns:
- a new HttpRequest with the given query parameter added
-
removeParameter
- Parameters:
name- the query parameter name- Returns:
- a new HttpRequest with the given query parameter removed
-
getRequestURL
The URL the client used to make the request. Includes a protocol, server name, port number, and server path, but not the query string parameters.- Returns:
- the request URL
-
getParameter
- Parameters:
name- the query parameter name- Returns:
- the first value for the parameter, or null
-
getParameters
- Parameters:
name- the query parameter name- Returns:
- a List containing all values for the parameter
-
getParameters
- Returns:
- a map of all query parameters
-
getEncodedParameter
Return an url encoded get parameter value Prefer to extract the original encoded value directly from queryString since url encoding is not canonical.- Parameters:
name-- Returns:
- the first value for the parameter, or null
-
getEncodedParameter
Return an url encoded get parameter value Prefer to extract the original encoded value directly from queryString since url encoding is not canonical.- Parameters:
name-defaultValue-- Returns:
- the first value for the parameter, or url encoded default value
-
equals
-
hashCode
public int hashCode() -
toString
-