fixedDelay attribute is not able to convert header value to integer

37 views
Skip to first unread message

jagroop bhanot

unread,
Mar 1, 2023, 6:39:00 PM3/1/23
to wiremock-user
I am trying to mimic a scenario where I have mappings defined in json file with request and response and i want to inject variable delay. Variable delay is that i will pass a header with field "delay" and value anything like "20000" or "40000" which means 2sec or 4 sec and i want to use the header value in the "fixedDelay" attribute in the json mapping.

"fixedDelayMilliseconds" : "{{request.headers.delay \"type\":'NUMERIC'}}",
The problem is :-  request.headers.delay contains string value and i am not able to convert to integer in json mapping.

fixedDelay attribute takes integer only. 

What is the way to have variable delay inject from the postman request header ? 

Tom Akehurst

unread,
Mar 2, 2023, 3:34:01 AM3/2/23
to wiremock-user
Hey, we're about to make this mailing list read-only as we've moved the community over to Slack. Can I suggest posting your question there?

Reply all
Reply to author
Forward
0 new messages