bruno/packages/bruno-lang/v2/tests/fixtures/request.bru
Sanjai Kumar 4d820af4e0
Improved Feat/wsse auth (#3172)
* adding wsse auth logic

* adding wsse auth logic to electron

* adding wsse auth formatting

* Refactoring WSSE 'secret' to 'password'

* Incorporating PR feedback

* Removed unused packages from package.json

* Fixed issue caused when resolving merge conflicts and added new route to test wsse

* Removed deprecated package usages from bruno-cli

* Fixed tests

---------

Co-authored-by: dwolter-emarsys <dylan.wolter@emarsys.com>
2024-09-23 17:46:31 +05:30

152 lines
2.2 KiB
Plaintext

meta {
name: Send Bulk SMS
type: http
seq: 1
}
get {
url: https://api.textlocal.in/send/:id
body: json
auth: bearer
}
params:query {
apiKey: secret
numbers: 998877665
~message: hello
}
params:path {
id: 123
}
headers {
content-type: application/json
Authorization: Bearer 123
~transaction-id: {{transactionId}}
}
auth:awsv4 {
accessKeyId: A12345678
secretAccessKey: thisisasecret
sessionToken: thisisafakesessiontoken
service: execute-api
region: us-east-1
profileName: test_profile
}
auth:basic {
username: john
password: secret
}
auth:wsse {
username: john
password: secret
}
auth:bearer {
token: 123
}
auth:digest {
username: john
password: secret
}
auth:oauth2 {
grant_type: authorization_code
callback_url: http://localhost:8080/api/auth/oauth2/authorization_code/callback
authorization_url: http://localhost:8080/api/auth/oauth2/authorization_code/authorize
access_token_url: http://localhost:8080/api/auth/oauth2/authorization_code/token
client_id: client_id_1
client_secret: client_secret_1
scope: read write
state: 807061d5f0be
pkce: false
}
body:json {
{
"hello": "world"
}
}
body:text {
This is a text body
}
body:xml {
<xml>
<name>John</name>
<age>30</age>
</xml>
}
body:sparql {
SELECT * WHERE {
?subject ?predicate ?object .
}
LIMIT 10
}
body:form-urlencoded {
apikey: secret
numbers: +91998877665
~message: hello
}
body:multipart-form {
apikey: secret
numbers: +91998877665
~message: hello
}
body:graphql {
{
launchesPast {
launch_site {
site_name
}
launch_success
}
}
}
body:graphql:vars {
{
"limit": 5
}
}
vars:pre-request {
departingDate: 2020-01-01
~returningDate: 2020-01-02
}
vars:post-response {
token: $res.body.token
@orderNumber: $res.body.orderNumber
~petId: $res.body.id
~@transactionId: $res.body.transactionId
}
assert {
$res.status: 200
~$res.body.message: success
}
script:pre-request {
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.
}