https://linen.dev logo
#help
Title
# help
a

Ahmad Saad

11/20/2023, 6:35 PM
Hey Wiremock fam, is there a way to do regex mapping on Headers when using Wiremock? Trying to filter based on whether incoming header contains a specific string value or not. Does just using
contains
work?
l

Lee Turner

11/20/2023, 7:05 PM
Yeah,
contains
should work:
Copy code
"headers": {
            "Accept": {
                "contains": "xml"
            }
        },
Or if you want to match the whole string you can use
equalTo
1
I think you can also use
matches
if you want to match using regex
2 Views