httpexpect icon indicating copy to clipboard operation
httpexpect copied to clipboard

Add DefaultFormatter.EnableRequests and EnableResponses

Open gavv opened this issue 4 years ago • 6 comments

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.

gavv avatar Nov 23 '22 17:11 gavv

Hello @gavv,

Could you please assign this one to me?

Thanks ;)

gdguesser avatar Jan 20 '23 19:01 gdguesser

Sure, thanks!

gavv avatar Jan 23 '23 11:01 gavv

@gdguesser hi, do you still plan to work on this?

gavv avatar Feb 18 '23 15:02 gavv

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 🙂.

gdguesser avatar Feb 18 '23 22:02 gdguesser

No worries, take your time. People often abandon tasks, so I usually ping after a month or so. Good luck with the new apartment :)

gavv avatar Feb 18 '23 22:02 gavv

Created follow-up issue: https://github.com/gavv/httpexpect/issues/343

gavv avatar Mar 22 '23 18:03 gavv