Full-featured, plugin-driven, middleware-oriented toolkit to easily create rich, versatile and composable HTTP clients in Go. gentleman embraces extensibility and composition principles in order to provide a flexible way to easily create featured HTTP client layers based on built-in or third-party plugins that you can register and reuse across HTTP clients. As an example, you can easily provide retry policy capabilities or dynamic server discovery in your HTTP clients simply attaching the retry or consul plugins. Take a look to the examples, list of supported plugins, HTTP entities or middleware layer to get started. For testing purposes, see baloo, a utility library for expressive end-to-end HTTP API testing, built on top of gentleman toolkit. For HTTP mocking, see gentleman-mock, which uses gock under the hood for easy and expressive HTTP client request mocking.
Features
- Plugin driven architecture
- Simple, expressive, fluent API
- Idiomatic built on top of net/http package
- Context-aware hierarchical middleware layer supporting all the HTTP life cycle
- Built-in multiplexer for easy composition capabilities
- Easy to extend via plugins/middleware