getBody ( ) { Object }

Gets the body of this request. This will attempt to parse the body if it is a JSON- or XML-document and return the parsed object. If the request is a submission of form-data a map of parameters is returned.

getContentAsString ( ) { String }

Gets the request body as a String

getContentType ( ) { String }

Gets the content-type of this request

getHeader ( name: String) { String }

Get the value of a header

Parameters
Name Type Description
name String

getHeaders ( ) { Object }

Get the headers of this request

getOriginCity ( ) { String }

Get the city from which this request originates.

getOriginCountry ( ) { String }

Get the country from which this request originates. Returned as the ISO 3166 2-letter country code.

getParameter ( name: String) { String }

Gets a request-parameter for this request

Parameters
Name Type Description
name String

isAsync ( ) { boolean }

Checks if this request/response-pair is in asynchronous-mode

readObject ( ) { null }

Parses the body of the request and returns the appropriate object.

startAsync ( timeout: long)

Set this request/response-pair into asynchronous-mode. This means that the response can be sent sometime in the future.

Parameters
Name Type Description
timeout long