Forum Discussion
NisHeraColin_McCraeAlexKaraskevin_kapell
Thanks for the reply.
I do have imported the required libraries earlier but I am getting a timeout error.
Is it ok if I ask for the code samples for how you are handling your request and response from the URLs ? As I am also working on REST I hope that will be a great help
Thanks All
Mine is VBScript ...
' Set up the POST Set json_object = CreateObject("MSXML2.ServerXMLHTTP") json_object.open "POST", <URL-OF-ENDPOINT>, False json_object.setRequestHeader "Content-Type", "application/json" ' Send the JSON json_object.send <JSON-DATA> ' Grab the reply code from the server reply = json_object.status
I use it as send only. (Hence always using "POST") The response is a simple response code. Which I normally expect to be a 200. And of course, it triggers some actions from the service it hits which are reflected on the website I run the tests against.
With a "GET" request, you get a JSON/XML blob in the response which you can parse.
<URL-OF-ENDPOINT> is the API endpoint you want to hit.
<JSON-DATA> is a string I build in code. It's only relevant to the application I'm testing obviously.
Pretty straightforward. More reading here: https://msdn.microsoft.com/en-us/library/ms766431(v=vs.85).aspx
Related Content
- 2 years ago
Recent Discussions
- 4 days ago
- 4 days ago