Defines an object to provide client request information to a web endpoint.

By: Matej Lazar

no type hierarchy

no supertypes hierarchy

no subtypes hierarchy

Attributes
contentTypeSource Codeshared formal String? contentType

Returns request content type, read from header.

destinationAddressSource Codeshared formal SocketAddress destinationAddress

Get the destination address of the HTTP request.

matchedTemplateSource Codeshared formal String? matchedTemplate

Get the matched template path when using a TemplateEndpoint.

methodSource Codeshared formal Method method

Get the HTTP request method. {OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT}

pathSource Codeshared formal String path

Get the request URI path. This is the whole original request path.

queryStringSource Codeshared formal String queryString
relativePathSource Codeshared formal String relativePath

Return path relative to endpoint mapping path. Relative path is a substring of path without startsWith() mappings.

Note that endpoints mapped with And and endsWith() will return complete path instead of relative. See Matcher.relativePath() for details.

schemeSource Codeshared formal String scheme

Get the request URI scheme. {http, https}

sessionSource Codeshared formal Session session

Returns users http session. If session doesn't exists, a new is created.

sourceAddressSource Codeshared formal SocketAddress sourceAddress

Get the source address of the HTTP request.

uriSource Codeshared formal String uri

Gets the request URI, including hostname, protocol etc if specified by the client.

Inherited Attributes
Attributes inherited from: Object
Methods
fileSource Codeshared formal UploadedFile? file(String name)
filesSource Codeshared formal UploadedFile[] files(String name)
formParameterSource Codeshared formal String? formParameter(String name)

Returns a single form parameter with the given name from the request body. Content-Type must be application/x-www-form-urlencoded.

formParametersSource Codeshared formal String[] formParameters(String name)

Returns all form parameters with the given name from the request body. Content-Type must be application/x-www-form-urlencoded.

Source Codeshared formal String? header(String name)

Returns a single header with given name.

headersSource Codeshared formal String[] headers(String name)

Returns all headers with given name.

parameterSource Codeshared formal String? parameter(String name, Boolean forceFormParsing = false)

Deprecated: Not specifying if the parameter's value should come from the query part in the URL or from the request body is discouraged at this level. Please use either queryParameter() or formParameter().

Returns a single parameters with given name. If there are more, the first one is returned. If forceFormParsing is false (default) and parameter with the same name exists in a query string, posted data is not parsed.

Parameters:
  • forceFormParsing = false
parametersSource Codeshared formal String[] parameters(String name, Boolean forceFormParsing = false)

Deprecated: Not specifying if the parameter's values should come from the query part in the URL or from the request body is discouraged at this level. Please use either queryParameters() or formParameters().

Returns all parameters with given name. If forceFormParsing is false (default) and parameter with the same name exists in a query string, posted data is not parsed. It is returned, only if it is already parsed.

Parameters:
  • forceFormParsing = false
pathParameterSource Codeshared formal String? pathParameter(String name)

Get a path parameter corresponding to a path component in curly braces when using a TemplateEndpoint.

queryParameterSource Codeshared formal String? queryParameter(String name)

Returns a single query parameter with the given name (from the query part of the request URL).

queryParametersSource Codeshared formal String[] queryParameters(String name)

Returns all single query parameter with the given name (from the query part of the request URL).

readSource Codeshared formal String read()

Read the contents of the request as text.

readBinarySource Codeshared formal Byte[] readBinary()

Read the contents of the request as binary byte array.

Inherited Methods
Methods inherited from: Object