<div dir="ltr">Hi,<div><br></div><div>I just found `checkResponse :: Request -> Response BodyReader -> IO ()`.</div><div><br></div><div>Unfortunately reading the body from it in order to log it will apparently empty the responseBody for further processors.</div><div><br></div><div>Any ideas?</div><div><br></div><div>Regards</div><div>Jan</div><div>P.S. I will probably open an issue on http-client</div></div><br><div class="gmail_quote"><div dir="ltr">Jan von Löwenstein <<a href="mailto:jan.loewenstein@gmail.com">jan.loewenstein@gmail.com</a>> schrieb am Di., 13. Dez. 2016 um 22:45 Uhr:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="gmail_msg">Hi,<div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">I wonder if there is a possibility to make servant-client or the layer below, i.e. http-client log all requests and corresponding responses into a log file.</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">There is `<a id="m_-1725482637825383597inbox-inbox-v:managerModifyRequest" class="m_-1725482637825383597inbox-inbox-def gmail_msg" style="color:rgb(0,0,0);font-size:13px;margin:0px;padding:0px;font-weight:bold;font-family:monospace">managerModifyRequest</a><span style="font-size:13px;font-family:monospace;background-color:rgb(240,240,240)" class="gmail_msg"><span class="m_-1725482637825383597inbox-inbox-Apple-converted-space gmail_msg"> </span>::<span class="m_-1725482637825383597inbox-inbox-Apple-converted-space gmail_msg"> </span></span><a href="https://hackage.haskell.org/package/http-client-0.5.4/docs/Network-HTTP-Client.html#t:ManagerSettings" style="font-size:13px;margin:0px;padding:0px;text-decoration:none;color:rgb(171,105,84);font-family:monospace" class="gmail_msg" target="_blank">ManagerSettings</a><span style="font-size:13px;font-family:monospace;background-color:rgb(240,240,240)" class="gmail_msg"><span class="m_-1725482637825383597inbox-inbox-Apple-converted-space gmail_msg"> </span>-><span class="m_-1725482637825383597inbox-inbox-Apple-converted-space gmail_msg"> </span></span><a href="https://hackage.haskell.org/package/http-client-0.5.4/docs/Network-HTTP-Client.html#t:Request" style="font-size:13px;margin:0px;padding:0px;text-decoration:none;color:rgb(171,105,84);font-family:monospace" class="gmail_msg" target="_blank">Request</a><span style="font-size:13px;font-family:monospace;background-color:rgb(240,240,240)" class="gmail_msg"><span class="m_-1725482637825383597inbox-inbox-Apple-converted-space gmail_msg"> </span>-><span class="m_-1725482637825383597inbox-inbox-Apple-converted-space gmail_msg"> </span></span><a href="https://hackage.haskell.org/package/base-4.9.0.0/docs/System-IO.html#t:IO" style="font-size:13px;margin:0px;padding:0px;text-decoration:none;color:rgb(171,105,84);font-family:monospace" class="gmail_msg" target="_blank">IO</a><span style="font-size:13px;font-family:monospace;background-color:rgb(240,240,240)" class="gmail_msg"><span class="m_-1725482637825383597inbox-inbox-Apple-converted-space gmail_msg"> </span></span><a href="https://hackage.haskell.org/package/http-client-0.5.4/docs/Network-HTTP-Client.html#t:Request" style="font-size:13px;margin:0px;padding:0px;text-decoration:none;color:rgb(171,105,84);font-family:monospace" class="gmail_msg" target="_blank">Request</a>` (<a href="https://github.com/snoyberg/http-client/blob/master/http-client/Network/HTTP/Client/Types.hs#L672" class="gmail_msg" target="_blank">https://github.com/snoyberg/http-client/blob/master/http-client/Network/HTTP/Client/Types.hs#L672</a>) which would allow to build logging for requests I suppose. </div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">However I could neither find a corresponding hook for Response, nor a "batteries included"TM `logRequests = True`, `requestLogger=...` or something along those lines.</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">Best</div></div><div dir="ltr" class="gmail_msg"><div class="gmail_msg">Jan</div></div></blockquote></div>