Hi, I am mocking an endpoint and I have to add hea...
# help
u
Hi, I am mocking an endpoint and I have to add header matching to request. but that header has an integer value. withHeader takes StringValuePattern as value. how can i do that ? language: kotlin
Copy code
patch(urlEqualTo("/endpoint"))
                .withHeader(EXECUTOR_USER, equalTo("123")) // it should be 123
                .willReturn(
                    aResponse()
                        .withStatus(statusCode)
                        .withBody(mockResponse)
                )
        )
t
You’re doing it the right way. Headers aren’t typed in HTTP, so they’re effectively all strings.