A Go package that prints HTTP client and server requests and responses in a human-readable, colorful terminal format.
httpretty is a Go package that logs HTTP requests and responses in a human-readable, colorized format directly to the terminal. It helps developers debug HTTP interactions by providing detailed, curl-like output for both client-side and server-side Go code. The package is highly configurable, allowing selective logging of headers, bodies, and other request details.
Go developers building HTTP clients or servers who need to inspect and debug network traffic during development. It's particularly useful for those working on APIs, microservices, or web applications.
Developers choose httpretty for its simplicity, native Go integration, and rich terminal output that eliminates the need for external proxies or complex debugging tools. Its inspiration from curl's verbose mode and support for both client and server logging make it a versatile choice for HTTP debugging.
Package httpretty prints the HTTP requests you make with Go pretty on your terminal.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Logs requests and responses with syntax highlighting and colors, similar to curl's verbose mode, making debugging visually intuitive and reducing the need for external tools.
Works as a transport wrapper for HTTP clients and as middleware for HTTP servers, providing flexible logging for both sides of HTTP interactions without requiring separate setups.
Allows selective logging of headers, bodies, TLS details, and timestamps via a simple struct configuration, enabling developers to tailor output to specific debugging needs.
Includes filter functions to skip specific requests and a JSON formatter for media types, offering control over what is logged and enhancing readability for common data formats.
Logs directly to the terminal by default, which is unsuitable for environments without console access or for persisting logs long-term without manual redirection or additional code.
Detailed logging of every request and response can introduce significant overhead, especially in high-volume scenarios, making it less ideal for performance-critical or production use cases.
Only provides a JSON formatter out of the box; other media types require custom implementation, which could be a barrier for teams needing immediate support for formats like XML or Protobuf.