How to get the status from scripted rest api

Santhosh23
Tera Expert

third part tool is using Scripted rest api for creating the record in servicenow. Please let me know how to get the HTTP status

1 REPLY 1

Shubham_Shinde
Giga Guru

Hello @Santhosh23 ,

In Scripted REST APIs we can set the Status code of the response to be send to the third party by using response.setStatus(code); ex. response.setStatus(200) but we cannot get any status code as it is an incoming request.

Please mark this comment as helpful/correct if it helps you.

 

Regards,

Shubham