public interface AQRequest
An instance of this interface is available to the script via aqua.request alias.
Modifier and Type | Method and Description |
---|---|
Cookie[] |
getCookies()
Returns an array containing all of the Cookie objects the client sent with this request.
|
String |
getHeader(String name)
Returns the value of the specified request header as a String.
|
String[] |
getHeaderNames()
Returns string array of all the header names this request contains.
|
String[] |
getHeaders(String name)
Returns all the values of the specified request header as a String array.
|
Locale[] |
getLocales()
Returns an array of Locale objects indicating, in decreasing order starting with the preferred locale,
the locales that are acceptable to the client based on the Accept-Language header.
|
String |
getMethod()
Returns the name of the HTTP method with which this request was made, for example, GET, POST, or PUT.
|
String |
getParameter(String name)
Returns value of the given request parameter, or null if the parameter is not found.
|
String |
getParameter(String name,
String defaultValue)
Returns value of the given request parameter, or the defaultValue specified if parameter is not found.
|
Enumeration |
getParameterNames()
Returns an Enumeration of String objects containing the names of the parameters contained in this request.
|
String[] |
getParameterValues(String name)
Returns an array of String objects containing all of the values the given request parameter has, or null if the parameter does not exist.
|
String |
getRemoteAddr()
Returns the Internet Protocol (IP) address of the client or last proxy that sent the request.
|
String |
getRemoteHost()
Returns the fully qualified name of the client or the last proxy that sent the request.
|
String |
getRequestURI()
Returns the part of this request's URL excluding protocol, host name and the part of the query string
after '?' character, for the purpose of constructing relative links.
|
AQSession |
getSession()
Returns the current session associated with this request, or if the request does not have a session, creates one.
|
String getMethod()
String
specifying the name of the method with
which this request was madeString getRequestURI()
String
containing the part of the URL
from the protocol name up to the query stringString getParameter(String name)
name
- Parameter name.String
representing the single value of the parameterString getParameter(String name, String defaultValue)
name
- Parameter name.defaultValue
- Default value.String
representing the single value of the parameter, or the default value.Enumeration getParameterNames()
String[] getParameterValues(String name)
name
- Parameter name.String
objects containing the parameter's valuesLocale[] getLocales()
Enumeration
of preferred Locale
objects for the clientAQSession getSession()
HttpSession
associated with this request or null
if create
is false
and the request has no valid sessionString getRemoteAddr()
String getRemoteHost()
String getHeader(String name)
name
- a String specifying the header nameString[] getHeaders(String name)
Some headers, such as Accept-Language can be sent by clients as several headers each with a different value rather than sending the header as a comma separated list.
If the request did not include any headers of the specified name, this method returns null. The header name is case insensitive. You can use this method with any request header.
name
- a String specifying the header nameString[] getHeaderNames()
Some servlet containers do not allow servlets to access headers using this method, in which case this method returns null
Cookie[] getCookies()
Copyright © 2017 AquaFold, Inc. All Rights Reserved. Use is subject to license terms.