Class for representing the set of HTTP parameters for a given request.

Constructor

Name Description
contentType CGI CONTENT_TYPE meta-variable.
documentRoot Optional Apache-style DOCUMENT_ROOT parameter.
headers HTTP headers as map.
ip CGI REMOTE_ADDR meta-variable.
method CGI REQUEST_METHOD (HTTP method) meta-variable.
pathInfo CGI PATH_INFO meta-variable.
query Map of QUERY_STRING subparameters, interpreted as HTML FORMS URL.
queryString CGI QUERY_STRING meta-variable.
queryStringDecoded Value derived from QUERY_STRING with ampersand characters replaced by semicolon characters, and semicolon characters present in the input QUERY_STRING replaced by numeric character entity references.
scriptFileName Apache-specific SCRIPT_FILENAME meta-variable.
scriptName CGI SCRIPT_NAME meta-variable.
serverName CGI SERVER_NAME meta-variable.
serverProtocol CGI SERVER_PROTOCOL meta-variable.

Member Details

contentType :string

CGI CONTENT_TYPE meta-variable.

documentRoot :string

Optional Apache-style DOCUMENT_ROOT parameter.

Contains the web root directory, without trailing slash.

Contains the empty string for in-browser use, or when DOCUMENT_ROOT represents the root of the file system hierarchy such that the result of appending a slash and a path always represents a regular file name.

headers :Object.<string, string>

HTTP headers as map.

ip :string

CGI REMOTE_ADDR meta-variable.

method :string

CGI REQUEST_METHOD (HTTP method) meta-variable.

pathInfo :string

CGI PATH_INFO meta-variable.

query :Object.<string, string>

Map of QUERY_STRING subparameters, interpreted as HTML FORMS URL.

queryString :string

CGI QUERY_STRING meta-variable.

queryStringDecoded

Value derived from QUERY_STRING with ampersand characters replaced by semicolon characters, and semicolon characters present in the input QUERY_STRING replaced by numeric character entity references.

scriptFileName :string

Apache-specific SCRIPT_FILENAME meta-variable.

Apache provides this meta-variable (as a URL-decoded, filename-like string) in addition to SCRIPT_NAME. It is supposed to contain the absolute path of the CGI script.

scriptName :string

CGI SCRIPT_NAME meta-variable.

Note Apache doesn't populate SCRIPT_NAME correctly when used with mod_rewrite.

serverName :string

CGI SERVER_NAME meta-variable.

serverProtocol :string

CGI SERVER_PROTOCOL meta-variable.