new THTTPRequest() #

An THTTPRequest object is created by UB server and passed as the first argument to the endpoint's methods or as a second argument to the rest entity method's event.

It may be used to access HTTP request status, headers and data.


decodedParameters : string instance #

URLDecoded parameters

decodedUri : string instance #

The same as uri, but URLDecode'd

headers : string instance #

HTTP request headers

method : string instance #

HTTP request method GET|POST|PUT......

parameters : string instance #

URL parameters. Can be transformed to object using queryString.parse

uri : string instance #

URL WITHOUT appName and endpoint name

url : string instance #

Full URL


read(encodingopt : String)→ArrayBuffer | String instance #

Read from source

Arguments info:

  • encoding: String

    Optional encoding of source. Default to 'utf-8'. If 'bin' - return ArrayBuffer source representation without any conversion. If 'base64' - transform base64 encoded content of source to ArrayBuffer If 'bin2base64' - transform content to base64 encoded string