Record post request made to an imposter

27 views
Skip to first unread message

Yuner Bekir

unread,
Dec 16, 2021, 10:00:17 AM12/16/21
to mountebank-discuss
Is it possible to record any request made to an imposter by a server? 
By recording I mean not the usual stub, but whether the server attempts to load any kind of information to the imposter?

Bob Ruub

unread,
Dec 19, 2021, 9:57:14 PM12/19/21
to mountebank-discuss
Add "recordRequests": true, to your stub setup.
{
  "port": 2525,
  "protocol": "http",
  "recordRequests": true,
......
}

Once you've started your stub it should give you a url to visit for help

info: [mb:12003] mountebank v2.4.0 now taking orders - point your browser to http://localhost:12003/ for help

For the config above I visit http://127.0.0.1:12003/imposters/2525 and it gives me a copy of all the requests made.

beware this can cause significant memory constraints at high load,  so you can add "--datadir .mdbd" to your command line and they will persist to disk.


Reply all
Reply to author
Forward
0 new messages