Set Body

You can set raw body using body tag inside of request.

Default content-type header is text/plain; charset=utf-8

request:
  body: |
    {
      "id":1
      "name": "test-name"
    }

Example

name: Set Body
stages:
  - name: request with body
    request:
      url: "https://httpbin.org/post"
      method: POST
      body: |
        {
          "id":1
          "name": "test-name"
        }
      headers:
        content-type: application/json

To set the correct content type make to to update the headers as well.

For JSON

      headers:
        content-type: application/json

For XML

      headers:
        content-type: text/xml; charset=utf-8