How to make HTTP requests within a script include

Not applicable

I would like to call a URL (say http://[domain]/abc.do) from a server-side script include and save the results to a table.

What API calls could I use to make HTTP requests within a script include?

Also if the domain is the same as the instance the script include is running, will the same session be used?

Thank you,
Afshin

3 REPLIES 3

tony_fugere
Mega Guru

You can use SOAPRequest to post a message to a URL. Will you be using SOAP or something else?


tyler_jones
ServiceNow Employee
ServiceNow Employee

What you want to do seems essentially the same as RESTful web service calls. This discussion may be of help to you:

HTTP POST to external url


john_andersen
Tera Guru

This may help as well...uses same principles as what you are describing...

http://www.john-james-andersen.com/blog/service-now/service-now-is-not-afraid-to-get-rest.html