Skip to Content
Bru LangLanguage

Language Design

A Bru file is made up of blocks. There are three kinds of blocks

  • Dictionary block
  • Text block
  • Array block

Dictionary block

A dictionary block contains a set of key value pairs.

get { url: https://api.textlocal.in/send } headers { content-type: application/json Authorization: Bearer 123 ~transaction-id: {{transactionId}} }

Any key in the dictionary block can be prefixed with ~ to indicate that it is disabled.

Text block

A text block is a set of lines

body { { "hello": "world" } } tests { expect(res.status).to.equal(200); }

Array block

An array block is a list of strings

vars:secret [ access_key, access_secret, ~transactionId ]

Any key in the array block can be prefixed with ~ to indicate that it is disabled.

Last updated on