TestProject Forum

API - URL from Header response

Im a beginer with TestProject and I need test API comunication and I need to get value from Header of response. Its URL in “Location” tag.

Fe.:
Headers: {Cache-Control=no-cache, no-store, must-revalidate, Pragma=no-cache, Expires=0, Content-Length=0, Date=Thu, 28 Oct 2021 18:01:54 GMT, Location=https://example/pay/shop.example.com/e692a87c-55df-4ad5-8f77-f4fda0aecb7b/}

I need work with the URL leater, resp. I need open the URL in browser.

Please help.

Thx.

Hi @bzukendap,
You can use extract string with regex:

This is the expression I used:

https:\/\/example\/pay\/shop\.example\.com\/[\w-]+\/