bruno/packages/bru-file/docs/proposed.bru

101 lines
1.7 KiB
Plaintext
Raw Normal View History

2023-01-10 05:15:24 +01:00
ver 1.0
type http-request
name Send Bulk SMS
method GET
url https://api.textlocal.in/bulk_json?apiKey=secret=&numbers=919988776655&message=hello&sender=600010
2023-01-13 23:51:57 +01:00
body-mode json
2023-01-10 05:15:24 +01:00
params
2023-01-13 23:51:57 +01:00
1 apiKey secret
1 numbers 998877665
1 message hello
2023-01-10 05:15:24 +01:00
/params
2023-01-13 23:51:57 +01:00
headers
1 content-type application/json
1 accept-language en-US,en;q=0.9,hi;q=0.8
0 transaction-id {{transactionId}}
/headers
2023-01-10 05:15:24 +01:00
body(type=json)
2023-01-13 23:51:57 +01:00
{
apikey: "secret",
numbers: "+91998877665",
data: {
sender: "TXTLCL",
messages: [{
numbers: "+91998877665",
message: "Hello World"
}]
}
2023-01-10 05:15:24 +01:00
}
/body
body(type=graphql)
2023-01-13 23:51:57 +01:00
{
launchesPast {
launch_site {
site_name
}
launch_success
2023-01-10 05:15:24 +01:00
}
}
/body
script
2023-01-13 23:51:57 +01:00
let user = 'John Doe';
2023-01-10 05:15:24 +01:00
2023-01-13 23:51:57 +01:00
function onRequest(request) {
request.body.user = user;
}
2023-01-10 05:15:24 +01:00
2023-01-13 23:51:57 +01:00
function onResponse(request, response) {
expect(response.status).to.equal(200);
}
2023-01-10 05:15:24 +01:00
/script
assert
2023-01-13 23:51:57 +01:00
{
"$res.data.order.items.length": 1,
"$res.data.orderNumber.isDefined": true
}
2023-01-10 05:15:24 +01:00
/assert
vars
2023-01-13 23:51:57 +01:00
1 petId $res.data.id
2023-01-10 05:15:24 +01:00
/vars
2023-01-14 00:07:39 +01:00
readme
Documentation about the request
/readme
2023-01-10 05:15:24 +01:00
response-example
2023-01-14 00:07:39 +01:00
name Created
status 201
headers
1 content-type application/json
1 accept-language en-US,en;q=0.9,hi;q=0.8
0 transaction-id {{transactionId}}
/headers
2023-01-10 05:15:24 +01:00
2023-01-14 00:07:39 +01:00
body
{
"data": {
"launchesPast": [
{
"launch_site": {
"site_name": "CCAFS SLC 40"
},
"launch_success": true
},
{
"launch_site": {
"site_name": "VAFB SLC 4E"
},
"launch_success": true
}
]
2023-01-10 05:15:24 +01:00
}
2023-01-14 00:07:39 +01:00
}
/body
2023-01-13 23:51:57 +01:00
/response-example