maxrussell
9 years agoContributor
Prefix a property transfer in header
I am using a property transfer to take an oAuth access_token from a response and transfer it to my next GET REST request. The header Name is "Authorization" and the value needs to be in the format "Bearer xxxxxx" ( where xxxxxx is the transferred access_token)
How to I add the Bearer prefix into my GET request? Do I need to add something in the property transfer target? Or is this done via test step properties?
I'll write my own response to this:
Bearer ${[Test Step name]#ResponseAsXML#[Xpath xpression]}
Does not work.
Instead, I needed to use a property transfer to Properties, where I stored acctok and then an appropriate header in my request:
Bearer ${acctok}
I would be interested to see how the ResponseAsXML#XPath Expression method works, but I couldn't get it to do so.