Reputation: 31
I have started using Soapui recently and i need an help.
I am able to fetch access_token from the response using Transfer Property.
Now I need to use ‘access_token’ in the next request header as in the screenshot and how can I achieve this. (Need to automate passing access_token to the request header)
I have done some research but i dint find anything on this part. Appreciate your response i am using SoapUI 5.3.0
Upvotes: 1
Views: 108
Reputation: 10329
You can use Property Expansion.
Set the value of the header to ${Token#Response#$.token_type} ${Token#Response#$.access_token}
. This expands to the response of your "Token" step, and uses JSONPath to select the value of token_type (which is probably "bearer") and access_token.
Note that the Transfer Property step is not necessary, in this case.
Upvotes: 2