Is there a way to set the response status in RESTl...
# suitescript
m
Is there a way to set the response status in RESTlet scripts?
n
What do you mean response status?
return JSON.stringify({
status: 'Success'
})
m
HTTP response status
n
Like 200? 404?
m
This will always return 200
yes
n
I am not sure you can do that.
m
Hmm, ok, will ask the receiver to ignore the status and check it from the body.
n
The status of the response actually defines if the call was success or not. It doesn't depend on what you are returning..
m
It is just strange that they don't provide a way to do that.