How to send array to another instance in REST

chnadra
Tera Contributor

Hi,

I would like to pass JSON object   to another instance which has lot of data.

Could you please tell how can we achieve it and please let us know whether object has data limit.

Suppose i want to pass following JSON object to   another instance : [[" smt. 22. 11","   _1414"," Fi ewall. 24.JI A301","   24.co e.Ajax.TD-841"," sco. 22.F12",""],["1","1","75","1","13",""],["0b1244ab4f254704de0d451f0310c7a2","3b44f10f4f298fc0de0d451f0310c797","a54ca98f4f6d0340c53eca1f0310c74f","ed0e39cb4fad0340c53eca1f0310c740","ef94331b4fe14704de0d451f0310c7ec",""]].

Thanks, Sankar

1 ACCEPTED SOLUTION

Geoffrey2
ServiceNow Employee
ServiceNow Employee

It sounds like you're sending data to the other instance with a GET method? And adding the info to the URL as a parameter?


That's not really the way you would want to send data. GET is used to ask for data. The data you are requesting comes back in the body of the response. The query paramters you add to the URL in a GET message are just a way to define a filter for the data you want to get back.


When you want to send data, you should use a POST method and put your data into the body of the message:


find_real_file.png



This way you will have less limitations on the amount of data you can send.



When using a GET method, to avoid issues with special charaters in your parameters, you may need to URI encode your parameters with encodeURI().


View solution in original post

5 REPLIES 5

Geoffrey2
ServiceNow Employee
ServiceNow Employee

I have no idea.


Try sending it through the MID server and see if that makes a difference.   The MID server works a bit differently - gives you automatic retries, etc.