h2non / gentleman

Plugin-driven, extensible HTTP client toolkit for Go

Home Page:https://pkg.go.dev/github.com/h2non/gentleman?tab=doc

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Consolidate interface for reusable HTTP client middlewares

h2non opened this issue · comments

commented

This thread is intended to provide a design discussion frame in order to consolidate a homogeneous and versatile HTTP client middleware interface that can be used in gentleman, as well as in other packages.

Ideally, the conclusion of this proposal will be introduced in gentleman@v2.

Proposal MVP:

  • context.Context capable.
  • Minimal, idiomatic interface, inspired by http.Handler.
  • Exclusive net/http types and interfaces coupling (third-party package agnostic, even gentleman).

Proposals and ideas are very welcome.

See also related issues:

commented

gentleman@v2 is finally out with first-class net/context support: https://github.com/h2non/gentleman