fwiw I'm with you on most of your gripes (I mean s...
# suitescript
j
fwiw I'm with you on most of your gripes (I mean seriously, calling something a """restlet""" but having no way to control basic aspects of the response like the headers or http response code)
n
@jkabot Clarification on this comment, I was looking to set the http response code on a RESTlet, sounds like that is not possible? I was looking at the http module and it seems that response code was a read only property?
j
restlet entry point functions do not have direct access to the incoming http request or the http response. You can only read the query parameters (for GET requests) or the request body (for POST requests), and you can only set the response body. You cannot inspect the request headers, you cannot set the response headers, and you cannot set the response code.
👍 1
NetSuite sets the content-type of the response to whatever the content-type of the request was NetSuite sets the response code mostly based on whether the person authenticated correctly see SuiteAnswers 19202
🐿️ 1
and SuiteAnswers 50994