I am trying to grab a token returned from an authentication endpoint and use it as a header in subsequent requests but the grabbed field is showing as the field name in the header rather than the field value.
Here is a simplified example:
Scenario:
# Log in and get an access token
Given I send and accept JSON
And I set JSON request body to:
"""
{ "email": "me@example.com", "password": "x" }
"""
And I send a POST request to "http://api/auth/login"
And I grab "$..access_token" as "token"
# Try to do another request using the above token in the Authorization header
Given I send and accept JSON
And I add Headers:
| Authorization | Foo {token} |
And I send a GET request to "http://api/customer/addresses"
...
I would expect the Authorization header in the second request to contain the token value but it actually just contains Foo {token}.
I am trying to grab a token returned from an authentication endpoint and use it as a header in subsequent requests but the grabbed field is showing as the field name in the header rather than the field value.
Here is a simplified example:
I would expect the Authorization header in the second request to contain the token value but it actually just contains
Foo {token}
.How can I add a grabbed value as a header?