resty README

The project's README from github.com/go-resty/resty. As one markdown file: README.md.

Resty Logo

Simple HTTP, REST, and SSE client library for Go

Resty Build Status Resty Code Coverage Plumber Score Go Report Card Resty GoDoc License Mentioned in Awesome Go

Documentation

Go to https://resty.dev and refer to godoc.

Minimum Go Version

Use go1.23 and above.

Support & Donate

Versioning

Resty releases versions according to Semantic Versioning

Contribution

I would welcome your contribution!

I always look forward to hearing feedback, appreciation, and real-world usage stories from Resty users on GitHub Discussions. It means a lot to me.

Creator

Jeevanandam M. ([email protected])

Contributors

Have a look on Contributors page.

License Info

Resty released under MIT LICENSE.

Resty Documentation and website released under Apache-2.0 LICENSE.

resty (go-resty/resty)

Searching Database…

11.8K ·GitHub
这是做什么的?Resty 是一个简洁的 Go 语言 HTTP、REST 和 SSE 客户端库——把它加到你的 Go 项目里,就可以调用各种网络服务。
它是要导入到 Go 代码里的库,还是一个命令行工具?它是一个库:你导入这个模块,然后在自己的 Go 代码中调用它。不需要单独安装或运行任何东西,而且从 v1.10.0 起它就已经是标准的 Go module 了。
怎么把它加到我的项目里?运行 go get github.com/go-resty/resty/v2,然后在代码中导入即可;需要 Go 1.23 或更新版本。API 参考文档在 godoc 上。
有 v1、v2 和 v3 三个版本,我该选哪个?这三个大版本的导入路径各不相同:v3 是最新的,通过 resty.dev/v3 这个 vanity URL 提供;v2 是 github.com/go-resty/resty/v2 模块;更早的 v1 系列通过 gopkg.in 发布,官方说明它已稳定、可用于生产环境。
可以免费使用吗,包括商业项目?代码采用 MIT 许可证发布,任何用途都可以免费使用,包括商业用途;只有文档和网站采用 Apache-2.0 许可证。
除了普通的 GET 和 POST 请求,它还能做什么?它自带带退避的重试机制、熔断器、中间件支持、HTTP 追踪、curl 命令日志、摘要认证(digest 认证)、重定向控制,以及通过 SRV 记录做服务发现实现的客户端负载均衡。
它经过充分验证、能用于生产环境吗?Resty 从 2015 年就存在了,GitHub 上大约有 11.8k 颗星。版本管理严格遵循语义化版本(Semantic Versioning),因此版本之间的升级是可预期的。
What are similar projects?go-zero, posting, node-restify, chi, fiber, martini, guzzle, aiohttp
Creator
go-resty
Size
4.7 MB
Stars
11.8K
Age
11y
Commits · 90 Days