gitmyhub

resty

Go ★ 12k updated 6d ago

Simple HTTP, REST, and SSE client library for Go

Resty is a Go library that makes calling REST APIs and sending HTTP requests much simpler, with built-in automatic retries, circuit breakers, and support for real-time server push (Server-Sent Events).

Gosetup: easycomplexity 2/5

Resty is a Go library that makes it easier to send HTTP requests and work with REST APIs from Go programs. HTTP requests are how programs communicate over the web, for example fetching data from an API or sending form data to a server. Go's standard library includes built-in tools for HTTP, but Resty wraps those with a more convenient interface that requires less repetitive code.

According to its topics and description, Resty also supports Server-Sent Events (a way for a server to push real-time updates to a client), digest authentication (a specific authentication scheme used by some APIs), circuit-breaker patterns (a way to stop repeatedly calling a service that is failing), and exponential backoff (automatically waiting longer between retries when requests fail). The library can also generate curl commands, which are a common way developers inspect and debug HTTP calls.

Resty is on its third major version (v3), which requires Go version 1.23 or newer. The library follows semantic versioning, meaning the version number communicates whether updates contain breaking changes. It is listed in the Awesome Go collection, a curated list of notable Go packages.

The README for this project is brief. It points readers to a separate documentation website (resty.dev) and to the Go package documentation site for detailed usage information. The project is open source under the MIT license and is maintained by a single creator with contributions from the community.

Where it fits