評估Go是否有好用的第三方HTTP client套件。
Go本身雖然有內建net/http package用來發收HTTP請求及回應,但使用上仍覺得不是那麼方便,所以搜尋是否有好用的第三方HTTP client。
去Awesome Go查看有哪些可用的HTTP client packages。比較這些套件在github上的一些指數例如星星數、更新狀況等。結果是resty勝出。
套件 | 特色 | 星星數 | 貢獻人數 | 被使用數 | 最後提交日 | Community Standards | README文件 | 評估日期 |
---|---|---|---|---|---|---|---|---|
h2non/gentleman | Features | 998 | 11 | 0 | 2021/2/19 | 普通 | 好 | 2023/2/20 |
hashicorp/go-cleanhttp | Get a "clean" http.Client -- returns a client that does not share any state with other clients. | 290 | 9 | 30.4k | 2023/2/1 | 普通 | 普通 | 2023/2/20 |
bozd4g/go-http-client | 52 | 1 | 23 | 2022/12/6 | 普通 | 普通 | 2023/2/20 | |
hashicorp/go-retryablehttp | HTTP client interface with automatic retries and exponential backoff | 1.5k | 34 | 15.7k | 2022/1/18 | 好 | 好 | 2023/2/20 |
levigross/grequests | Serialized JSON and XML response Easy file uploads and downloads Support HTTP verbs |
1.9k | 10 | 473 | 2022/12/22 | 普通 | 好 | 2023/2/20 |
gojek/heimdall | Control failing requests Request retry and retry strategy Request timeout |
2.4k | 27 | 36 | 2021/5/21 | 普通 | 好 | 2023/2/20 |
sethgrid/pester | Send out multiple requests and get the first back (only used for GET calls) Retry on errors Backoff |
616 | 10 | 399 | 2022/2/9 | 普通 | 普通 | 2023/2/20 |
imroc/req | Simple use Easy debugging Easy API testing Support retry Easy file upload and download Support middleware for request and response |
3k | 19 | 937 | 2023/2/20 | 普通 | 好 | 2023/2/20 |
monaco-io/request | Inspired by Javascript-axios Python-request. No 3rd dependency | 223 | 5 | 87 | 2021/12/28 | 好 | 普通 | 2023/2/20 |
carlmjohnson/requests | fluent API | 537 | 3 | 78 | 2023/2/1 | 普通 | 普通 | 2023/2/20 |
go-resty/resty | Chainable methods Multiple request body type Response as byte array or string Supports RFC7807 Backoff Retry Mechanism |
7.3k | 75 | 8.1k | 2022/7/20 | 普通 | 好 | 2023/2/20 |
dghubble/sling | 1.5k | 17 | 2.2k | 2022/12/8 | 普通 | 普通 | 2023/2/20 |
沒有留言:
張貼留言