grae22
grae22

Reputation: 104

How to add timestamp when recording with Mountebank?

I'd like each recorded http request & response to be timestamped (ms precision) when recording with Mountebank.

I've considerred using something like Fiddler to add the timestamp, but would rather be able to do this with Moutebank.

Any ideas?

Upvotes: 0

Views: 325

Answers (1)

bbyars
bbyars

Reputation: 406

The addDecorateBehavior field should do the trick. You could, for example, set a header:

(request, response) => { response.headers.timestamp = new Date(); }

Upvotes: 0

Related Questions