Plugin-driven, middleware-oriented library to easily create rich, versatile and composable HTTP clients in Go.
Note: work in progress, interface contract may change at this time.
go get -u gopkg.in/h2non/gentleman.v0
- Plugin driven.
- Simple and expressive API.
- Idiomatic built on top of
net/http
package. - Strong extensibility capabilities.
- Control-flow capable middleware layer to manage full HTTP live cycle.
- Built-in multiplexer with easy composition features.
- Easy to configure and use.
- Convenient helpers and abstractions over HTTP primitives in Go.
- Dependency free.
Name | Docs | API | Status | Description |
---|---|---|---|---|
url | Easily declare URL, base URL and path values in HTTP requests | |||
auth | Declare authorization headers in your requests | |||
body | Easily define bodies based on JSON, XML, strings, buffers or streams | |||
bodytype | Define body MIME type by alias | |||
cookies | Declare and store HTTP cookies easily | |||
compression | Helpers to define enable/disable HTTP compression | |||
headers | Manage HTTP headers easily | |||
multipart | Create multipart forms easily. Supports files and custom fields | |||
proxy | Configure HTTP proxy servers | |||
query | Easily manage query params | |||
redirect | Easily configure a custom redirect policy | |||
timeout | Easily configure the HTTP timeouts (request, dial, TLS...) | |||
transport | Define a custom HTTP transport easily | |||
tls | Configure the TLS options used by the HTTP transport |
Send a PR to add your plugin to the list.
TODO
See godoc reference for detailed API documentation.
- plugin - [reference](https://godoc.org/github.com/h2non/ - gentleman) - Plugin layer for gentleman.
- mux - reference - HTTP client multiplexer with built-in matchers.
- middleware - reference - Middleware layer used by gentleman.
- context - reference - HTTP context implementation for gentleman's middleware.
- utils - reference - HTTP utilities used internally.
See examples directory for featured use case examples.
MIT - Tomas Aparicio