gs.log('Request body is: '+sreq.getRequestBody()); what does this statement mean?

Shyna1
Tera Contributor

What does this statement mean?

1 ACCEPTED SOLUTION

For details sreq.getRequestBody() returns the string of the current web service request (what is being sent to the service provide such as the contents of a record to update.)



gs.log() is a legacy debug statement which will appear in the System Logs> Script Log Statements


View solution in original post

3 REPLIES 3

Chuck Tomasi
Tera Patron

It looks like someone is doing a debug output on a REST or SOAP request. They want to ensure that the request body being sent to the service provide is as they expect. More context would be helpful, but that's what I see in this statement.


For details sreq.getRequestBody() returns the string of the current web service request (what is being sent to the service provide such as the contents of a record to update.)



gs.log() is a legacy debug statement which will appear in the System Logs> Script Log Statements


If I have answered your question, please mark my response as correct so that others with the same question in the future can find it quickly and that it gets removed from the Unanswered list.



If you are viewing this from the community inbox you will not see the correct answer button.   If so, please review How to Mark Answers Correct From Inbox View.



Thank you