How do i log the request and response?

65 views
Skip to first unread message

Sriram Subramanian

unread,
Dec 10, 2014, 7:38:55 AM12/10/14
to webmoc...@googlegroups.com
Hello all,

I have stubbed calls from my app. Certain requests have passed and certain requests fails.  I want to log the passed requests along with the response also the requests that has failed.

If the logged request details has the following will help a lot:
* request url
* query params
* request body

Any help is greatly appreciated.

Thanks

Bartosz Blimke

unread,
Dec 10, 2014, 8:42:07 AM12/10/14
to webmoc...@googlegroups.com
Hi,

How do you understand passed and failed requests?

Bartosz

--

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

Pete Higgins

unread,
Dec 10, 2014, 6:34:03 PM12/10/14
to webmoc...@googlegroups.com

--

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

Hi Sriram,

I've used Webmock to log requests before using the Webmock.after_request feature documented here: https://github.com/bblimke/webmock#request-callbacks

The docs are a bit sparse, but if you play around with it it becomes pretty clear how to use it.

pete
Reply all
Reply to author
Forward
0 new messages