THTTPRequest

THTTPRequest

new THTTPRequest()

Structure for direct read HTTP request properties. Passed as parameter to endpoints handler. Also accessible in in entity level scripting methods while in rest mode
Implements:

Members

headers: String readonly

HTTP request headers

method: String readonly

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

url: String readonly

full request URL with app name, method name and parameters for request http://host:port/ub/rest/doc_document/report?id=1&param2=asdas

  • return ub/rest/doc_document/report?id=1&param2=asdas

uri: String readonly

request URI - URL WITHOUT appName and method name

  • return doc_document/report

decodedUri: String readonly

The same as uri, but URLDecode'd

 req.uri === "TripPinServiceRW/My%20People"
 //
 req.decodedUri === "TripPinServiceRW/My People"

parameters: String readonly

request parameters if any

  • return id=1&param2=asdas

decodedParameters: String readonly

URLDecoded request parameters if any

 req.parameters === "$filter=Name%20eq%20%27John%27"
 //
 req.decodedParameters === "$filter=Name eq 'John'"

body: String

HTTP request body
Deprecated:

Methods

read(encodingopt)ArrayBuffer|String

Read from source
Arguments:
  1. [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
Implements: