Steven Craig
04/24/2025, 8:29 PMCeligo AI
04/24/2025, 8:29 PMAI generated answer (using internal Slack threads):The DELETE call to your RESTlet requires a body because of how NetSuite handles different HTTP methods. In NetSuite's RESTlet framework, the DELETE method is designed to receive parameters from the HTTP request URL, not from the body of the request. This is a specific design choice made by NetSuite and is often referred to as a 'netsuite-ism'. Here is a sample code snippet that shows how the DELETE method is defined in a RESTlet:
javascript
/**
* Defines the function that is executed when a DELETE request is sent to a RESTlet.
* @param {Object} requestParams - Parameters from HTTP request URL; parameters are passed as an Object (for all supported
* content types)
* @returns {string | Object} HTTP response body; returns a string when request Content-Type is 'text/plain'; returns an
* Object when request Content-Type is 'application/json' or 'application/xml'
* @since 2015.2
*/
const doDelete = (requestParams) => {
}
As you can see from the code snippet, the doDelete
function takes requestParams
as an argument, which are parameters from the HTTP request URL. This is why your DELETE call requires a body - the parameters are expected to be passed in the URL, not in the body of the request.
******
Disclaimer:
This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes.
******Celigo AI
04/24/2025, 8:29 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.857297897
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.854066
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.825974107
Celigo AI
04/24/2025, 8:29 PM