A simple yet powerful Go HTTP client with automatic decoding, debugging, retry, and HTTP fingerprinting support.
Req is a Go HTTP client library that simplifies making HTTP requests with an intuitive, chainable API. It automates complex tasks like response decoding, request retries, and HTTP version negotiation, reducing boilerplate code for developers. The library also includes advanced features like debugging utilities, HTTP fingerprint impersonation, and extensible middleware support.
Go developers building applications that interact with REST APIs, perform web scraping, or require robust HTTP communication with features like automatic retry and debugging. It's particularly useful for those who want a more ergonomic alternative to the standard `net/http` package.
Developers choose Req for its balance of simplicity and power—it eliminates common HTTP client pain points with smart defaults and automation while remaining highly customizable. Its unique selling point is the "black magic" that handles encoding, decoding, and protocol details automatically, coupled with enterprise-grade features like fingerprinting and middleware.
Simple Go HTTP client with Black Magic
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Uses chainable methods for client and request configurations, reducing boilerplate code as shown in examples like `client.R().SetHeader().Get()` in the README.
Includes built-in debug logs, performance traces, and full request/response dumping, enabling easy troubleshooting without external tools, as highlighted in the DevMode usage.
Automatically detects and decodes responses to UTF-8 to prevent garbled characters, and handles marshaling/unmarshaling based on Content-Type, simplifying data processing.
Provides HTTP fingerprinting for web scraping, customizable retry logic, and support for multiple HTTP versions out of the box, which are often separate add-ons in other libraries.
Introduces an external library dependency, which can be a concern for projects aiming to keep dependencies minimal or those locked into the standard net/http package.
The automation features and additional layers like middleware may add latency compared to manually optimized requests using the standard library, especially in high-throughput scenarios.
While basic usage is simple, mastering advanced features such as custom middleware and HTTP fingerprinting requires additional configuration and understanding, as noted in the tutorials.