Skip to content

Add DefaultFormatter.EnableRequests and EnableResponses #159

@gavv

Description

@gavv

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: #137

See also #160.

Metadata

Metadata

Assignees

Labels

featureNew feature or requesthelp wantedContributions are welcomeimportantImportant task

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions