33 lines
409 B
Plaintext
33 lines
409 B
Plaintext
meta {
|
|
name: Login
|
|
type: http
|
|
seq: 1
|
|
}
|
|
|
|
get {
|
|
url: https://{{readerIp}}/cloud/localRestLogin
|
|
body: none
|
|
auth: basic
|
|
}
|
|
|
|
auth:basic {
|
|
username: admin
|
|
password: Zebra123!
|
|
}
|
|
|
|
script:post-response {
|
|
const body = res.getBody();
|
|
|
|
if (body.message) {
|
|
bru.setEnvVar("token", body.message);
|
|
} else {
|
|
bru.setEnvVar("token", "error");
|
|
}
|
|
|
|
}
|
|
|
|
settings {
|
|
encodeUrl: true
|
|
timeout: 0
|
|
}
|