Add DefaultFormatter.EnableRequests and EnableResponses
Add two flags EnableRequests and EnableResponses to DefaultFormatter, which enable printing http.Request and http.Response on failure. New flags should be disabled by default.
Request and response instances are already present in AssertionContext passed to formatter. Formatted request and response should be added to FormatData and used in failure template. Formatting can be done using httputil, like we do it in DebugPrinter.
Formatted response should include round trip time (again like in DebugPrinter).
Related discussion: https://github.com/gavv/httpexpect/discussions/137
See also #160.
Hello @gavv,
Could you please assign this one to me?
Thanks ;)
Sure, thanks!
@gdguesser hi, do you still plan to work on this?
Hey @gavv,
Thank you for checking in on the task. My apologies for not responding sooner, but I had to move to a new apartment. I am still fully committed to completing the task, but if you find that someone else is interested in it, I'm more than happy to let them take over. I appreciate your understanding, and I look forward to contributing to the project 🙂.
No worries, take your time. People often abandon tasks, so I usually ping after a month or so. Good luck with the new apartment :)
Created follow-up issue: https://github.com/gavv/httpexpect/issues/343