post

Description

This function runs when a post request calls the RESTlet—usually to create something, like a NetSuite record.

Returns

The RESTlet returns an HTTP response body as either a string or an Object.

  • You'll get a string if the Content-Type is 'text/plain'.

  • You'll get an Object if the Content-Type is 'application/json' or 'application/xml'.

Since

Version 2015 Release 2

Parameters
Note:

NetSuite automatically passes requestParams as a JavaScript object to your RESTlet entry point.

Parameter

Type

Required / Optional

Description

Since

requestBody

string | Object

required, but automatically passed by NetSuite

The request body is a string if the Content-Type is 'text/plain', or a JavaScript object if the Content-Type is 'application/json' or 'application/xml'.

Version 2015 Release 2

Related Topics

General Notices