Is it possible to assert on a list of response headers #2123
-
I have a site that I want to verify by asserting header responses, however the response contains the same header name multiple times in the response with different values. When I capture that header in a variable, its type is a list, I then tried to use "includes and contains to look for a specific value, however those only work on strings. An example of a capture is [Capture] [Asserts]
Is there a way to assert a value in the header list, or a way to concert the list to a string? Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hi @cesarsaenz
Also, you can check what headers you're receiving with --verbose, |
Beta Was this translation helpful? Give feedback.
-
Maybe you can use filters, that allows you to transform data.
You have also |
Beta Was this translation helpful? Give feedback.
Maybe you can use filters, that allows you to transform data.
In this sample,
nth
is a filter that extract the nth element of a list. There is a blog post introducing filters with more example here https://hurl.dev/blog/2023/01/25/hurl-2.0.0-the-graphql-edition.html#processing-data-with-filters:split
allows you …