Skip to content

Instantly share code, notes, and snippets.

@fishmandev
Created October 23, 2022 09:20
Show Gist options
  • Save fishmandev/ca8ca5dc3c473eeabddbd3f0ddbfa375 to your computer and use it in GitHub Desktop.
Save fishmandev/ca8ca5dc3c473eeabddbd3f0ddbfa375 to your computer and use it in GitHub Desktop.
[HTTP client] Saving the response to a variable
POST https://domain.com/api/login
Content-Type: application/json
{
"email":"email@gmail.com",
"password":"********",
"device":"android"
}
> {% client.global.set("auth_token", response.body.access_token); %}
###
POST https://domain.com/api/companies
Content-Type: application/json
Authorization: Bearer {{auth_token}}
{
"company_id":1,
"role":"user",
"device":"android"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment