bruno/packages/bruno-lang/v2/tests/fixtures/request.bru
2023-02-05 00:27:18 +05:30

119 lines
1.3 KiB
Plaintext

meta {
name: Send Bulk SMS
type: http
seq: 1
}
get {
url: https://api.textlocal.in/send/
body: json
}
query {
apiKey: secret
numbers: 998877665
}
query:disabled {
message: hello
}
headers {
content-type: application/json
Authorization: Bearer 123
}
headers:disabled {
transaction-id: {{transactionId}}
}
body:json {
{
"hello": "world"
}
}
body:text {
This is a text body
}
body:xml {
<xml>
<name>John</name>
<age>30</age>
</xml>
}
body:form-urlencoded {
apikey: secret
numbers: +91998877665
}
body:form-urlencoded:disabled {
message: hello
}
body:multipart-form {
apikey: secret
numbers: +91998877665
}
body:multipart-form:disabled {
message: hello
}
body:graphql {
{
launchesPast {
launch_site {
site_name
}
launch_success
}
}
}
body:graphql:vars {
{
"limit": 5
}
}
vars {
token: $res.body.token
}
vars:disabled {
petId: $res.body.id
}
vars:local {
orderNumber: $res.body.orderNumber
}
vars:local:disabled {
transactionId: $res.body.transactionId
}
assert {
$res.status: 200
}
assert:disabled {
$res.body.message: success
}
script {
const foo = 'bar';
}
tests {
function onResponse(request, response) {
expect(response.status).to.equal(200);
}
}
docs {
This request needs auth token to be set in the headers.
}