Rest ExecuteGet
Use this command to retrieve information returned from a REST HTTP GET method. You may use this command in conjunction with REST GETRESPONSEHEADER to retrieve additional information about the response. You may also use this command in conjunction with the REST GETRESPONSESTATUS command to retrieve additional information regarding the status of the request..
Syntax
REST EXECUTEGET url TO Target [Timeout]
where:
- url is the resource to retrieve the information from.
- Target is the variable or document name that will contain the response.
- Timeout is the time to wait, in seconds, for the total request.
Syntax example
// Example with Target as a variable
CREATE VARIABLE TestResult1 AS String
REST EXECUTEGET "http://api.fixer.io/latest" TO TestResult1
EXPORTVARIABLE TestResult1 TestResult1.json
// Example with Target as a document
CREATE DOCUMENT "TestResult2.json"
REST EXECUTEGET "http://api.fixer.io/latest" TO "TestResult2.json"
SAVE "TestResult2.json"