Modifying responses dynamically?

545 views
Skip to first unread message

Scott Davis

unread,
Nov 13, 2014, 2:59:04 PM11/13/14
to mounteban...@googlegroups.com
Is it possible with mountebank to modify the responses returned? For example, my responses contain dates, and I would like to change them to always be the current date. 

Thanks,
Scott

Brandon Byars

unread,
Nov 14, 2014, 10:30:50 PM11/14/14
to Scott Davis, mountebank-discuss
Hi Scott,
Right now this is only possible using injection: http://www.mbtest.org/docs/api/injection.

I'm playing with a couple of ideas to add some decorator behavior to stubs that can post-process responses; this feels like something that would fit that model well.
-Brandon

--
You received this message because you are subscribed to the Google Groups "mountebank-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mountebank-disc...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Brandon Byars

unread,
Jan 4, 2015, 12:12:38 AM1/4/15
to Scott Davis, mountebank-discuss
FYI - v1.2.0, just released, has a new decorator behavior that supports this example, which is documented here: http://www.mbtest.org/docs/api/behaviors
-Brandon
Reply all
Reply to author
Forward
0 new messages