Files
bruno/packages/bruno-tests/collection/scripting/api/res/getHeaders.bru
Anoop M D 753a576c3c Feat/safe mode quickjs (#2848)
Safe Mode Sandbox using QuickJS
Co-authored-by: Anoop M D <anoop.md1421@gmail.com>
Co-authored-by: lohit <lohit.jiddimani@gmail.com>
2024-08-21 12:52:49 +05:30

40 lines
457 B
Plaintext

meta {
name: getHeaders
type: http
seq: 3
}
post {
url: {{host}}/api/echo/json
body: json
auth: none
}
auth:basic {
username: asd
password: j
}
auth:bearer {
token:
}
body:json {
{
"hello": "bruno"
}
}
assert {
res.status: eq 200
}
tests {
test("res.getHeaders(name)", function() {
const h = res.getHeaders();
expect(h['x-powered-by']).to.eql('Express');
expect(h['content-length']).to.eql('17');
});
}