Forum Discussion
- Colin_McCraeCommunity Hero
Headers are a property of the HTTP object. Not something you can access directly from TC as standard as far as I know.
You can create your own HTTP object in script:
https://msdn.microsoft.com/en-us/library/ms766431(v=vs.85).aspx
Set the body and header properties of that and interrogate the body and header of the response. If it's sending JSON back and forth, sounds more like a webservice you're dealing with.
Hi Samithak,
You can try using the XMLHTTPRequest object to accomplish your task. Refer to the Preparing SOAP Requests in Scripts ( http://smartbear.com/viewarticle/70743/ ) article to learn how to use it.
- Colin_McCraeCommunity Hero
Tanya - does that work with JSON? All the ref material seems to refer to XML?
Just that to get the response, he'll probaby have to generate the request himself as well, and it sounds like it's using JSON. I know the MS ServerXMLHTTP object I linked to above handles JSON just fine, despite the name (and lack of any mention of JSON in the docs for it).