mirror of
https://github.com/usebruno/bruno.git
synced 2026-06-24 13:15:40 +00:00
40 lines
510 B
Plaintext
40 lines
510 B
Plaintext
meta {
|
|
name: setHeader
|
|
type: http
|
|
seq: 6
|
|
}
|
|
|
|
get {
|
|
url: {{host}}/ping
|
|
body: none
|
|
auth: none
|
|
}
|
|
|
|
headers {
|
|
bruno: is-awesome
|
|
}
|
|
|
|
auth:awsv4 {
|
|
accessKeyId: a
|
|
secretAccessKey: b
|
|
sessionToken: c
|
|
service: d
|
|
region: e
|
|
profileName: f
|
|
}
|
|
|
|
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");
|
|
});
|
|
} |