meta {
  name: Send Bulk SMS
  type: http
  seq: 1
}

get {
  url: https://api.textlocal.in/send
  body: json
}

query {
  apiKey: secret
  numbers: 998877665
  ~message: hello
}

headers {
  content-type: application/json
  Authorization: Bearer 123
  ~transaction-id: {{transactionId}}
}

body:json {
  {
    "hello": "world"
  }
}

body:text {
  This is a text body
}

body:xml {
  <xml>
    <name>John</name>
    <age>30</age>
  </xml>
}

body:form-urlencoded {
  apikey: secret
  numbers: +91998877665
  ~message: hello
}

body:multipart-form {
  apikey: secret
  numbers: +91998877665
  ~message: hello
}

body:graphql {
  {
    launchesPast {
      launch_site {
        site_name
      }
      launch_success
    }
  }
}

body:graphql:vars {
  {
    "limit": 5
  }
}

vars:req {
  departingDate: 2020-01-01
  ~returningDate: 2020-01-02
}

vars:res {
  token: $res.body.token
  @orderNumber: $res.body.orderNumber
  ~petId: $res.body.id
  ~@transactionId: $res.body.transactionId
}

assert {
  $res.status: 200
  ~$res.body.message: success
}

script:req {
  const foo = 'bar';
}

tests {
  function onResponse(request, response) {
    expect(response.status).to.equal(200);
  }
}

docs {
  This request needs auth token to be set in the headers.
}