mirror of
https://github.com/kristoferssolo/tree-sitter-bruno.git
synced 2025-10-21 20:10:34 +00:00
61 lines
697 B
Plaintext
61 lines
697 B
Plaintext
========================
|
|
Script Pre-Request Tags
|
|
========================
|
|
|
|
script:pre-request {
|
|
req.setHeader("Authorization", "{{token}}");
|
|
}
|
|
|
|
---
|
|
|
|
(source_file
|
|
tag: (script
|
|
(scriptreq
|
|
(keyword)
|
|
(textblock
|
|
(rawtext)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
|
|
========================
|
|
Script Post-Response Tags
|
|
========================
|
|
|
|
script:post-response {
|
|
bru.setVar("token", res.body.token);
|
|
}
|
|
|
|
---
|
|
|
|
(source_file
|
|
tag: (script
|
|
(scriptres
|
|
(keyword)
|
|
(textblock
|
|
(rawtext)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
|
|
========================
|
|
Test Tags
|
|
========================
|
|
|
|
tests {
|
|
expect(res.status).to.equal(200);
|
|
}
|
|
|
|
---
|
|
|
|
(source_file
|
|
tag: (tests
|
|
(keyword)
|
|
(textblock
|
|
(rawtext)
|
|
)
|
|
)
|
|
)
|