Chaxs
Chaxs

Reputation: 1

Authorization access token in request header

I have trying to pass authorization token in Request header, but it's failing. Please help me to pass this.

I have used Regular Expression Extractor and Json extractor with “access_token”:”(.+?)" and $.access_token expressions for replace the value but no used.

enter image description here

enter image description here

enter image description here

Upvotes: 0

Views: 37

Answers (2)

shyam Vishwakarma
shyam Vishwakarma

Reputation: 1

"accessToken":"(?s)(.+?)" use this expression to capture your value.

Upvotes: 0

Ivan G
Ivan G

Reputation: 2707

Your regular expression is wrong in the Regular Expression Extractor.

Also you can use JSON Extractor instead, the relevant JSONPath query would be as simple as $.accessToken

More information: How to Use the JSON Extractor For Testing

Upvotes: 0

Related Questions