Plugin-driven, extensible HTTP client toolkit for Go, built on net/http with a hierarchical middleware layer.
Gentleman is a full-featured, plugin-driven HTTP client toolkit for Go that embraces extensibility and composition principles. It provides a flexible way to create rich, versatile HTTP clients using a middleware-oriented architecture, making it ideal for building domain-specific API clients. Built on top of Go's standard net/http package, it offers convenient helpers for URL templating, JSON/XML serialization, and HTTP mocking.
Go developers building domain-specific HTTP API clients or those needing a highly extensible and composable HTTP client layer with middleware support. It's particularly suited for engineers who require reusable client logic, such as in microservices or SDK development.
Developers choose Gentleman over alternatives for its plugin-driven architecture and hierarchical middleware layer, which allow easy extension and composition of functionality like retry policies, authentication, and server discovery. Its focus on reusability through client and request entity inheritance, along with built-in multiplexing for conditional plugin execution, provides a clean, idiomatic way to manage complex HTTP client logic.
Plugin-driven, extensible HTTP client toolkit for Go
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Enables easy extension with built-in and third-party plugins for features like auth, retry, and mocking, as detailed in the plugins table, promoting modular design.
Supports multiple HTTP lifecycle phases (e.g., request, response, error), allowing fine-grained interception and modification, ideal for complex client logic.
Uses client and request entities with inheritance, plus a built-in multiplexer, for reusable and conditional plugin execution, enhancing code reusability.
Facilitates HTTP mocking via plugins like gentleman-mock, leveraging gock for expressive testing, as highlighted in the README examples.
The plugin ecosystem is small, with few community plugins listed, relying heavily on user contributions for extended functionality.
Requires understanding middleware phases and plugin architecture, which can be daunting for developers accustomed to simpler HTTP clients.
The layered, plugin-driven design may add overhead for basic HTTP tasks, making it less efficient than lightweight alternatives.