Files
bruno/packages/bruno-tests/collection/scripting/api/req/getBody.bru
2024-08-12 12:27:32 +05:30

41 lines
409 B
Plaintext

meta {
name: getBody
type: http
seq: 9
}
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("req.getBody()", function() {
const data = res.getBody();
expect(data).to.eql({
"hello": "bruno"
});
});
}