mirror of
https://github.com/usebruno/bruno.git
synced 2025-02-04 03:49:22 +01:00
753a576c3c
Safe Mode Sandbox using QuickJS Co-authored-by: Anoop M D <anoop.md1421@gmail.com> Co-authored-by: lohit <lohit.jiddimani@gmail.com>
32 lines
397 B
Plaintext
32 lines
397 B
Plaintext
meta {
|
|
name: setHeader
|
|
type: http
|
|
seq: 6
|
|
}
|
|
|
|
get {
|
|
url: {{host}}/ping
|
|
body: none
|
|
auth: none
|
|
}
|
|
|
|
headers {
|
|
bruno: is-awesome
|
|
}
|
|
|
|
|
|
assert {
|
|
res.status: eq 200
|
|
res.body: eq pong
|
|
}
|
|
|
|
script:pre-request {
|
|
req.setHeader('bruno', 'is-the-future');
|
|
}
|
|
|
|
tests {
|
|
test("req.setHeader(name)", function() {
|
|
const h = req.getHeader('bruno');
|
|
expect(h).to.equal("is-the-future");
|
|
});
|
|
} |