N/scriptTypes/restlet Module

Use the N/scriptTypes/restlet module to create custom HTTP responses for your RESTlet script. This module is available only to RESTlet script type.

                                   

In This Help Topic

N/scriptTypes/restlet Module Members

Member Type

Name

Return Type / Value Type

Supported Script Types

Description

Object

restlet.Response

Object (read-only)

RESTlet script

An HTTP response of a RESTlet script.

Method

restlet.createResponse(options)

restlet.Response

RESTlet script

Creates a custom HTTP response.

Response Object Members

The following members are called on the restlet.Response object.

Member Type

Name

Return Type / Value Type

Supported Script Types

Description

Property

Response.content

string (read-only)

RESTlet script

The content of the RESTlet HTTP response.

Response.contentType

string (read-only)

RESTlet script

The Content-Type header of the RESTlet HTTP response.

Related Topics

General Notices