get

Description

Defines the function that is executed when a get request is sent to a RESTlet. Typically used for retrieving, such as retrieving a NetSuite record.

Returns

An HTTP response body is returned with a string or Object.

  • Returns a string when the request Content-Type is 'text/plain'.

  • Returns an Object when the request Content-Type is 'application/json' or ‘application/xml’.

Since

Version 2015 Release 2

Parameters
Note:

The requestParams parameter is a JavaScript object. It is automatically passed to the RESTlet script entry point by NetSuite.

Parameter

Type

Required / Optional

Description

Since

requestParams

Object

required, but automatically passed by NetSuite

The parameters from the HTTP request URL. For all content types, parameters are passed as a JavaScript Object.

Version 2015 Release 2

Related Topics

SuiteScript 2.x RESTlet Script Entry Points
delete
post
put

General Notices