We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

JSON Request in query parameters

harishdasari
Tera Guru

Hi,

How to pass this JSON request in query parameters of REST API

"comment":   { "body": "The smoke is very colorful." },

find_real_file.png

Thank you.

1 ACCEPTED SOLUTION

Hi Harish,



http://wiki.servicenow.com/index.php?title=RESTMessageV2_API#setRequestBody.28String_body.29



You can use setRequestBody method for setting this "request body"



eg,



setRequestBody(JSON.stringify(myObj));


View solution in original post

5 REPLIES 5

Hi Harish,



http://wiki.servicenow.com/index.php?title=RESTMessageV2_API#setRequestBody.28String_body.29



You can use setRequestBody method for setting this "request body"



eg,



setRequestBody(JSON.stringify(myObj));