Skip to content
This repository was archived by the owner on Apr 17, 2024. It is now read-only.
This repository was archived by the owner on Apr 17, 2024. It is now read-only.

Set variable from response header #284

@ramontiveros

Description

@ramontiveros

I want to set a variable (an auth token) that I get in the header of a login request: For example from:

POST http://:server/login

// POST http://example.com/login
// HTTP/1.1 200 OK
// X-Frame-Options: SAMEORIGIN
// X-XSS-Protection: 1; mode=block
// X-Content-Type-Options: nosniff
// X-Download-Options: noopen
// X-Permitted-Cross-Domain-Policies: none
// Referrer-Policy: strict-origin-when-cross-origin
// Content-Type: application/json; charset=utf-8
// Vary: Accept
// Authorization: Bearer XXXXXXXXXXXXXXXXTOKENXXXXXXXXXXXXXXXXXXX
// ETag: W/"f45022010a6c3922806b91360e225e67"
// Cache-Control: max-age=0, private, must-revalidate
// X-Request-Id: 40726d41-3a74-42a9-9461-f3f681f99cb5
// X-Runtime: 0.908726
// Transfer-Encoding: chunked
// Request duration: 0.913235s

I want to extract the Baerer token to set a variable value, but the examples of per-request hooks only cover read data from the result, not the headers. Is this possible?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions