Add routes

This commit is contained in:
Dayamond committed 2025-10-21 17:18:00 +02:00
1 parent 42a98f3435
commit a7b9ce803b
5 files changed
+91 -1

No files matched your search

+51
View File
@@ -0,0 +1,51 @@
meta {
name: Login
type: http
seq: 4
}
post {
url: http://localhost:8000/api/users/login
body: json
auth: basic
}
headers {
X-XSRF-TOKEN: eyJpdiI6IjZaY0Y4aWtBMkxhWnlWQ2VpNDBhQWc9PSIsInZhbHVlIjoiWkF0N2lWTmlRSzdienZqREp0YUxPOFg0OE10bXZZME1QRitZRjV6bGs3QnZ0WUJVU1RkL0h0eDhPR1huODFuZzFHMDQxNzg4eDN4Ri91eVdFSDNVNUloSGZtRHd1aFd0TEF6MkxzOUhDMjRJeUxEYUcveEZHcVlzMnZha0Q1MkQiLCJtYWMiOiI0MDc2NzRmMjFiNDhjMDBjMWY4Yzc5Y2FjNTZhZWNkN2FkM2RmMzJlZDNmOWYwNDFhZWFlZGFmOGE4ZTA0Yzg0IiwidGFnIjoiIn0=
Accept: application/json
}
auth:basic {
username: test@test.com
password: test
}
body:json {
{
"email": "{{email}}",
"password": "{{password}}"
}
}
vars:pre-request {
email: test@test.com
password: test
xsrf: null
}
settings {
encodeUrl: true
timeout: 0
}
docs {
Permet de se connecter
Le header X-XSRF-TOKEN est obligatoire.
Pour le récupérer:
- Lancer la requête get CSR
- Prendre la valeur XSRF-TOKEN du Set-Cookie des Header
- Mettre la valeur dans le script extractCSRF.js
- Copier la valeur de retour
}