go-zoox/fetch

go-zoox/fetch 是一个简单、好用且功能强大的 Go HTTP 客户端库,特别适合有前端或 Node.js 开发经验的开发者。它支持 HTTP 基础方法、动态 JSON、超时/重试机制、取消机制、自定义代理、文件上传/下载以及进度条等功能。

Check out go-zoox/fetch on CurateClick

• Copy the embed code to showcase this product on your website

• Share on X to spread the word about this amazing tool

项目信息* 项目地址:https://github.com/go-zoox/fetch* 类别:Go* 项目标题:简单、好用、强大的 Go HTTP Client* 项目描述: * 它是一个基于 Go HTTP Client 的上层应用,方便开发者使用,特别适合有前端 / Node.js 开发经验的开发者 * 支持 HTTP 基础方法 * 支持动态 JSON * 支持超时/重试机制 * 支持取消机制 * 支持自定义代理 * 支持一键 Upload / Download * 支持进度条等### 亮点* 易于使用,简单强大### 示例代码#### GET 方法gopackage mainimport ( "github.com/go-zoox/fetch")func main() { response, err := fetch.Get("https://httpbin.org/get") if err != nil {panic(err)} fmt.Println(response.JSON())}#### POST 方法gopackage mainimport ( "github.com/go-zoox/fetch")func main() { response, _ := fetch.Post("https://httpbin.org/post", &fetch.Config{Body: map[string]interface{}{"foo": "bar","foo2": "bar2","number": 1,"boolean": true,"array": []string{"foo3","bar3",},"nest": map[string]string{"foo4": "bar4",},},})if err != nil {panic(err)} fmt.Println(response.JSON())}#### PUT 方法gopackage mainimport ( "github.com/go-zoox/fetch")func main() {response, err := fetch.Put("https://httpbin.org/put", &fetch.Config{Body: map[string]interface{}{"foo": "bar","foo2": "bar2","number": 1,"boolean": true,"array": []string{"foo3","bar3",},"nest": map[string]string{"foo4": "bar4",},},}) if err != nil {panic(err)} fmt.Println(response.JSON())}#### DELETE 方法gopackage mainimport ( "github.com/go-zoox/fetch")func main() {response, err := fetch.Delete("https://httpbin.org/Delete", &fetch.Config{Body: map[string]interface{}{"foo": "bar","foo2": "bar2","number": 1,"boolean": true,"array": []string{"foo3","bar3",},"nest": map[string]string{"foo4": "bar4",},},})if err != nil {panic(err)} fmt.Println(response.JSON())}#### 下载文件gopackage mainimport ( "github.com/go-zoox/fetch")func main() {response, err := fetch.Download("https://httpbin.org/image", "/tmp/image.webp") if err != nil {panic(err)}}#### 上传文件### Uploadgopackage mainimport ( "github.com/go-zoox/fetch")func main() {file, _ := os.Open("go.mod")response, err := Upload("https://httpbin.org/upload", file) if err != nil {panic(err)}fmt.Println(response.JSON())}#### 自定义代理 Proxygopackage mainimport ( "github.com/go-zoox/fetch")func main() { response, err := fetch.Get("https://httpbin.org/ip", &fetch.Config{ Proxy: "http://127.0.0.1:17890", }) if err != nil {panic(err)} fmt.Println(response.JSON())}### 后续计划* 支持 UNIX Domain Sockets* 支持自定义 Cache* 支持 WebDAV 协议* 支持 Plugin System* 支持 Middleware System

Latest Weekly Picks

make.ink favicon
Weekly Pick

Your AI tattoo generator for pro-grade concepts

Leo Wade
sellfy.com favicon
Weekly Pick

A code-free online store builder to turn views into revenue. Sell digital products, subscriptions, and merch, without fees or hassle.

Maris
www.videotoblog.ai favicon
Weekly Pick

Convert videos into awesome blog posts.

Video To Blog
www.sellerpic.ai favicon
Weekly Pick

SellerPic is the all-in-one AI design platform for e-commerce

SellerPic
fastimage.ai favicon
Weekly Pick

Fast Image AI instantly transforms your photos into stunning styles like Ghibli, Sketch, and Pixar. Effortlessly control image elements and create amazing effects with just one click.

Fast AI Team
linkedinpro.daisy.so favicon
Weekly Pick

AI-powered tool that transforms casual photos into professional LinkedIn headshots instantly. No photographer needed—just upload and download.

Gabriel
crevas.ai favicon
Weekly Pick

Crevas unifies Veo 3, Sora 2, Nano Banana and more into one intuitive canvas — so filmmakers can script, prompt, and generate cinematic stories without switching tools or losing consistency.

Spark Alpha
fotominiatur.com favicon
Weekly Pick

AI Foto Edit - Text to Image & Image Edit

foto miniatur