1
0

feat: add very basic bruno collection

This commit is contained in:
kolaente
2023-10-10 21:04:57 +02:00
parent 250043dd75
commit 7eb59f577c
11 changed files with 48 additions and 441 deletions

5
rest/bruno.json Normal file
View File

@ -0,0 +1,5 @@
{
"version": "1",
"name": "API-Requests",
"type": "collection"
}

View File

@ -0,0 +1,3 @@
vars {
host: http://localhost:3456
}

26
rest/login.bru Normal file
View File

@ -0,0 +1,26 @@
meta {
name: login
type: http
seq: 1
}
post {
url: {{host}}/api/v1/login
body: json
}
body:json {
{
"username": "{{username}}",
"password": "{{password}}"
}
}
vars:pre-request {
username: test
password: 12345678
}
vars:post-response {
token: res.body.token
}

14
rest/user info.bru Normal file
View File

@ -0,0 +1,14 @@
meta {
name: user info
type: http
seq: 2
}
get {
url: {{host}}/api/v1/user
body: none
}
headers {
Authorization: Bearer {{token}}
}