Hi, I appreciate if I can get some pointers how to extract a value.
I am trying to extract the id 494103 from the response header location with the following expression
.check(headerRegex(“Location”, “(\d+)”).saveAs(“cartId”))
HTTP response:
status:
303 See Other
headers:
Content-Length: 0
Connection: keep-alive
Server: nginx/1.16.1
Location: /cartdetail?CartId=494103
However, I always get the error if found nothing, I wonder if the / at the beginning of the location header is the culprit, because I can extract other header such as Server no problem.
headerRegex((Location,(\d+))).find.exists, found nothing 1 (100.0%)
Appreciate the help.