mirror of
https://github.com/usebruno/bruno.git
synced 2025-03-04 17:41:21 +01:00
41 lines
409 B
Plaintext
41 lines
409 B
Plaintext
|
meta {
|
||
|
name: getBody
|
||
|
type: http
|
||
|
seq: 4
|
||
|
}
|
||
|
|
||
|
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.getBody()", function() {
|
||
|
const data = res.getBody();
|
||
|
expect(data).to.eql({
|
||
|
"hello": "bruno"
|
||
|
});
|
||
|
});
|
||
|
|
||
|
}
|