Make HTTP(s) requests

Maestro comes with its own JavaScript HTTP API
// script.js
var response = http.get('')
output.script.result = response.body


Use json() function to parse JSON responses.
For example, assume that returns the following result:
"myField": {
"mySubField": "Test value"
mySubField could then be accessed in the following way:
// script.js
var response = http.get('')
output.script.result = json(response.body).myField.mySubField

POST request

To send body to a given endpoint, specify a body parameter:
// script.js
var response ='', {
body: JSON.stringify(
myField: "Payload"


Headers can be provided in a headers parameter
// script.js
var response = http.get('', {
headers: {
Authorization: 'Bearer MyToken'

Other request types

The following request methods are provided out of the box:
  • http.get
  • http.put
  • http.delete
To send a request of any other HTTP method, use http.request
// script.js
var response = http.request('`, {
method: "GET" // or specify any other method, i.e. OPTION

Response object

Field Name
true if request was successful, false otherwise
HTTP status code (i.e. 200)
String body of the response