For the complete documentation index, see llms.txt. This page is also available as Markdown.

RestRequestMessage

RestRequestMessage object represents an HTTP request returned by the REST Store message script.

Constructor

var message = new RestRequestMessage();

Fields

Name

Description

body

Contains the body of the HTTP request.

headers

Contains the HTTP request headers. Methods and properties are equivalent to the Bundle object.

Examples

A custom HTTP header can be added using the following code:

var request = new RestRequestMessage();

// Add header
request.headers.set('User-Agent', 'My Agent ' + new Date().getTime());

Note that HTTP message headers generated by the script have higher priority than the static HTTP headers specified in the REST Store.

Last updated