Tidied up Bruno files.
This commit is contained in:
@@ -5,12 +5,22 @@ info:
|
||||
|
||||
http:
|
||||
method: GET
|
||||
url: http://localhost:3000/api/auth/token
|
||||
url: "{{BASE_URL}}/api/auth/token"
|
||||
headers:
|
||||
- name: Cookie
|
||||
value: refresh=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1IjoiMSIsInIiOiIxIiwiaWF0IjoxNzcxNTk3NjQ2LCJleHAiOjE3NzQxODk2NDZ9.07ViS5Nie3Bi2OgnlHyybDNZ9bdXPRRiqO-RFLhjoKo; Path=/; Max-Age=2592000; Secure; HttpOnly; SameSite=Lax
|
||||
value: "{{REFRESH_COOKIE}}"
|
||||
auth: inherit
|
||||
|
||||
runtime:
|
||||
scripts:
|
||||
- type: after-response
|
||||
code: |-
|
||||
function onResponse(res) {
|
||||
let data = res.getBody();
|
||||
bru.setEnvVar("BEARER_TOKEN", data.token);
|
||||
}
|
||||
onResponse(res);
|
||||
|
||||
settings:
|
||||
encodeUrl: true
|
||||
timeout: 0
|
||||
|
||||
Reference in New Issue
Block a user