getOriginalRequest

The serviceLib.getOriginalRequest() system function provides access to an HTTP request. If the function is invoked in a callback or onException function, the HTTP request was sent to the service during the specific call that caused the service to invoke the callback or onException function. If serviceLib.getOriginalRequest() is invoked elsewhere, the HTTP request was sent to the service during the most recent invocation of the call statement; and in the absence of a previous call statement, the HTTP request fields are empty.

Syntax

  result HTTPRequest = serviceLib.getOriginalRequest()

The invocation returns a record that is based on the Record part HTTPRequest, which is provided for you and has the following fields:

body, type STRING?
The value sent to the service:
  • In the case of a REST service, body contains the value in one of four formats (XML, JSON, NONE, or FORM), as described in Creating an Interface part to access a REST service. In the case of an EGL REST service, the format is JSON.
  • In the case of a Web service, body contains the SOAP message in JSON format.
headers, type Dictionary
Contains a set of name-value pairs. Each entry key in the dictionary is the name of an HTTP header that was sent to the service, and the related value (a string) is the value of that header.
method, type STRING
One of the HTTP verbs available to Rich UI:
  • GET (for reading a resource)
  • POST (for creating a resource)
  • PUT (for updating one)
  • DELETE (for deleting one)
queryParameters, type Dictionary
A set of name-and-value pairs that were included in the service invocation at run time.
uri, type String
Contains the address of the resource; for example, http://www.example.com/getTime. This string includes the values of path variables and query parameters.

Feedback