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

Shruti Mishra

04/30/2023, 7:31 AM
Hi Team, My scenerio is that, in the request header wanted to validate the value...based upon that required to have a response. For eg: In the request header "Abc" : {{dynamic value(base 64 encoded)}} Have to decode that value. Apply the validation and check if that decoded value contains certain chars. If yes render 200 response else 400 response. Here I dont wanted to reuse the value in response, instead have to apply validation and toggle the success and failure response. Is anyone can recommend some example related to this. Thanks.
k

Kapish Malik

05/01/2023, 5:08 PM
I believe ResponseDefinitionTransformer ll be helpful here. You can go through this here - https://wiremock.org/3.x/docs/extending-wiremock/#response-definition-transformation