36 lines
502 B
Plaintext
36 lines
502 B
Plaintext
meta {
|
|
name: Login
|
|
type: http
|
|
seq: 10
|
|
}
|
|
|
|
post {
|
|
url: {{url}}/lst/api/user/login
|
|
body: json
|
|
auth: inherit
|
|
}
|
|
|
|
body:json {
|
|
{
|
|
"username": "cowch",
|
|
"password": "Alpla2025!"
|
|
}
|
|
}
|
|
|
|
script:post-response {
|
|
// grab the raw Set-Cookie header
|
|
const cookies = res.headers["set-cookie"];
|
|
|
|
const sessionCookie = cookies[0].split(";")[0];
|
|
|
|
// Save it as an environment variable
|
|
bru.setEnvVar("session_cookie", sessionCookie);
|
|
|
|
|
|
}
|
|
|
|
settings {
|
|
encodeUrl: true
|
|
timeout: 0
|
|
}
|