Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Go
  3. gentleman

gentleman

MITGov2.0.5

Plugin-driven, extensible HTTP client toolkit for Go, built on net/http with a hierarchical middleware layer.

Visit WebsiteGitHubGitHub
1.1k stars58 forks0 contributors

What is gentleman?

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.

Target Audience

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.

Value Proposition

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.

Overview

Plugin-driven, extensible HTTP client toolkit for Go

Use Cases

Best For

  • Building domain-specific HTTP API clients with reusable logic and middleware.
  • Implementing extensible HTTP clients with custom plugins for features like retry policies, authentication, or dynamic server discovery.
  • Creating composable HTTP client layers where conditional plugin execution based on matchers (e.g., method, host) is required.
  • Developing Go applications that need easy HTTP mocking for testing, integrated via plugins like gentleman-mock.
  • Managing complex HTTP request/response life cycles with middleware phases for interception, error handling, and traffic modification.
  • Structuring HTTP clients with inheritance hierarchies for shared configuration across multiple requests.

Not Ideal For

  • Projects requiring only simple, one-off HTTP requests without middleware or plugin overhead
  • High-performance applications where the layered architecture might introduce unnecessary latency
  • Teams seeking a large, active ecosystem of pre-built plugins beyond the core offerings
  • Quick prototyping or scripts where the standard net/http package is sufficient

Pros & Cons

Pros

Plugin-Driven Flexibility

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.

Hierarchical Middleware Control

Supports multiple HTTP lifecycle phases (e.g., request, response, error), allowing fine-grained interception and modification, ideal for complex client logic.

Clean Composition and Inheritance

Uses client and request entities with inheritance, plus a built-in multiplexer, for reusable and conditional plugin execution, enhancing code reusability.

Integrated Testing Support

Facilitates HTTP mocking via plugins like gentleman-mock, leveraging gock for expressive testing, as highlighted in the README examples.

Cons

Limited Third-Party Ecosystem

The plugin ecosystem is small, with few community plugins listed, relying heavily on user contributions for extended functionality.

Complex Setup and Learning Curve

Requires understanding middleware phases and plugin architecture, which can be daunting for developers accustomed to simpler HTTP clients.

Potential Performance Overhead

The layered, plugin-driven design may add overhead for basic HTTP tasks, making it less efficient than lightweight alternatives.

Frequently Asked Questions

Quick Stats

Stars1,131
Forks58
Contributors0
Open Issues26
Last commit2 years ago
CreatedSince 2016

Tags

#net-http#plugin-system#modular#client#http#retry#testing#api-client#golang#sdk#consul#go#http-client#middleware#extensible

Built With

G
Go

Links & Resources

Website

Included in

Go169.1k
Auto-fetched 18 hours ago

Related Projects

restyresty

Simple HTTP, REST, and SSE client library for Go

Stars11,729
Forks791
Last commit5 days ago
reqreq

Simple Go HTTP client with Black Magic

Stars4,824
Forks406
Last commit8 days ago
heimdallheimdall

An enhanced HTTP client for Go

Stars2,773
Forks206
Last commit23 days ago
go-retryablehttpgo-retryablehttp

Retryable HTTP client in Go

Stars2,340
Forks293
Last commit2 months ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub