{"id":13413650,"url":"https://github.com/go-zoox/fetch","last_synced_at":"2026-03-04T23:06:50.574Z","repository":{"id":37007617,"uuid":"470274115","full_name":"go-zoox/fetch","owner":"go-zoox","description":"Go Fetch - A Powerful, Lightweight, Easy Http Client, inspired by Web Fetch API","archived":false,"fork":false,"pushed_at":"2026-01-18T13:05:53.000Z","size":211,"stargazers_count":88,"open_issues_count":2,"forks_count":7,"subscribers_count":3,"default_branch":"master","last_synced_at":"2026-01-18T19:37:49.049Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://go-zoox.github.io/fetch/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/go-zoox.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-03-15T17:55:35.000Z","updated_at":"2026-01-18T13:05:56.000Z","dependencies_parsed_at":"2024-06-05T03:28:58.059Z","dependency_job_id":"51c9244e-fb59-4aa6-ab3c-8ad14e71b62f","html_url":"https://github.com/go-zoox/fetch","commit_stats":null,"previous_names":[],"tags_count":71,"template":false,"template_full_name":null,"purl":"pkg:github/go-zoox/fetch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-zoox%2Ffetch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-zoox%2Ffetch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-zoox%2Ffetch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-zoox%2Ffetch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/go-zoox","download_url":"https://codeload.github.com/go-zoox/fetch/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-zoox%2Ffetch/sbom","scorecard":{"id":432705,"data":{"date":"2025-08-11","repo":{"name":"github.com/go-zoox/fetch","commit":"ac57c0a7a9060a2fdfaeb83d9225806d01fb8a9e"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.6,"checks":[{"name":"Code-Review","score":0,"reason":"Found 2/21 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":5,"reason":"6 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 5","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/go-zoox/fetch/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/go-zoox/fetch/ci.yml/master?enable=pin","Warn: goCommand not pinned by hash: .github/workflows/ci.yml:26","Warn: goCommand not pinned by hash: .github/workflows/ci.yml:27","Warn: goCommand not pinned by hash: .github/workflows/ci.yml:28","Info:   0 out of   1 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of   3 goCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 13 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":7,"reason":"3 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2024-3333","Warn: Project is vulnerable to: GO-2025-3503 / GHSA-qxp5-gwg8-xv66","Warn: Project is vulnerable to: GO-2025-3595 / GHSA-vvgc-356p-c3xw"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-19T03:44:13.287Z","repository_id":37007617,"created_at":"2025-08-19T03:44:13.287Z","updated_at":"2025-08-19T03:44:13.287Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30098169,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T22:49:54.894Z","status":"ssl_error","status_checked_at":"2026-03-04T22:49:48.883Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-30T20:01:45.431Z","updated_at":"2026-03-04T23:06:50.554Z","avatar_url":"https://github.com/go-zoox.png","language":"Go","readme":"# Fetch - HTTP Client\n\n`HTTP Client` for Go, inspired by the [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API), and [Axios](https://github.com/axios/axios) + [Got](https://github.com/sindresorhus/got) (Sindre Sorhus).\n\n[![PkgGoDev](https://pkg.go.dev/badge/github.com/go-zoox/fetch)](https://pkg.go.dev/github.com/go-zoox/fetch)\n[![Build Status](https://github.com/go-zoox/fetch/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/go-zoox/fetch/actions/workflows/ci.yml)\n[![Go Report Card](https://goreportcard.com/badge/github.com/go-zoox/fetch)](https://goreportcard.com/report/github.com/go-zoox/fetch)\n[![Coverage Status](https://coveralls.io/repos/github/go-zoox/fetch/badge.svg?branch=master)](https://coveralls.io/github/go-zoox/fetch?branch=master)\n[![GitHub issues](https://img.shields.io/github/issues/go-zoox/fetch.svg)](https://github.com/go-zoox/fetch/issues)\n[![Release](https://img.shields.io/github/tag/go-zoox/fetch.svg?label=Release)](https://github.com/go-zoox/fetch/releases)\n\n## Features\n\n### Main API\n\n- [x] Make HTTP requests\n- [x] Easy JSON Response\n- [x] GZip support\n  - [x] Decode GZip response\n  - [x] Encode GZip request (Upload File with GZip)\n- [x] HTTP/2 support\n- [x] TLS\n  - [x] Custom TLS Ca Certificate (Self signed certificate) [Example](https://github.com/go-zoox/examples/tree/master/https/fetch)\n  - [x] Custom Client Cert and Key for two-way authentication (Client Cert and Key)\n- [x] Simple Auth Methods\n  - [x] Basic Auth\n  - [x] Bearer Auth\n- [x] Support cancel (using context)\n\n### Timeouts and retries\n\n- [x] Support timeout\n- [x] Support retry on failure\n\n### Progress\n\n- [x] Support progress and progress events\n\n### File upload and download\n\n- [x] Download files easily\n- [x] Upload files easily\n\n### Cache, Proxy and UNIX sockets\n\n- [ ] [RFC compliant caching](https://github.com/sindresorhus/got/blob/main/documentation/cache.md)\n- [x] Proxy support\n  - [x] Environment variables (HTTP_PROXY/HTTPS_PROXY/SOCKS_PROXY)\n  - [x] Custom proxy\n- [x] UNIX Domain Sockets\n  - [Example: HTTP](https://github.com/go-zoox/examples/tree/master/unix-domain-socket/http)\n  - [Example: HTTPs](https://github.com/go-zoox/examples/tree/master/unix-domain-socket/https)\n\n### WebDAV\n\n- [ ] WebDAV protocol support\n\n### Advanced creation\n\n- [ ] Plugin system\n- [ ] Middleware system\n\n## Installation\n\nTo install the package, run:\n\n```bash\ngo get github.com/go-zoox/fetch\n```\n\n## Methods\n\n- [x] GET\n- [x] POST\n- [x] PUT\n- [x] PATCH\n- [x] DELETE\n- [x] HEAD\n- [ ] OPTIONS\n- [ ] TRACE\n- [ ] CONNECT\n\n## Getting Started\n\n```go\npackage main\n\nimport (\n  \"github.com/go-zoox/fetch\"\n)\n\nfunc main() {\n  response, _ := fetch.Get(\"https://httpbin.zcorky.com/get\")\n  url := response.Get(\"url\")\n  method := response.Get(\"method\")\n\n  fmt.Println(url, method)\n}\n```\n\n## Examples\n\n### Get\n\n```go\npackage main\n\nimport (\n  \"github.com/go-zoox/fetch\"\n)\n\nfunc main() {\n  response, err := fetch.Get(\"https://httpbin.zcorky.com/get\")\n  if err != nil {\n\t\tpanic(err)\n\t}\n\n  fmt.Println(response.JSON())\n}\n```\n\n### Post\n\n```go\npackage main\n\nimport (\n  \"github.com/go-zoox/fetch\"\n)\n\nfunc main() {\n  response, err := fetch.Post(\"https://httpbin.zcorky.com/post\", \u0026fetch.Config{\n\t\tBody: map[string]interface{}{\n\t\t\t\"foo\":     \"bar\",\n\t\t\t\"foo2\":    \"bar2\",\n\t\t\t\"number\":  1,\n\t\t\t\"boolean\": true,\n\t\t\t\"array\": []string{\n\t\t\t\t\"foo3\",\n\t\t\t\t\"bar3\",\n\t\t\t},\n\t\t\t\"nest\": map[string]string{\n\t\t\t\t\"foo4\": \"bar4\",\n\t\t\t},\n\t\t},\n\t})\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n  fmt.Println(response.JSON())\n}\n```\n\n### Put\n\n```go\npackage main\n\nimport (\n  \"github.com/go-zoox/fetch\"\n)\n\nfunc main() {\n\tresponse, err := fetch.Put(\"https://httpbin.zcorky.com/put\", \u0026fetch.Config{\n\t\tBody: map[string]interface{}{\n\t\t\t\"foo\":     \"bar\",\n\t\t\t\"foo2\":    \"bar2\",\n\t\t\t\"number\":  1,\n\t\t\t\"boolean\": true,\n\t\t\t\"array\": []string{\n\t\t\t\t\"foo3\",\n\t\t\t\t\"bar3\",\n\t\t\t},\n\t\t\t\"nest\": map[string]string{\n\t\t\t\t\"foo4\": \"bar4\",\n\t\t\t},\n\t\t},\n\t})\n  if err != nil {\n\t\tpanic(err)\n\t}\n\n\n  fmt.Println(response.JSON())\n}\n```\n\n### Delete\n\n```go\npackage main\n\nimport (\n  \"github.com/go-zoox/fetch\"\n)\n\nfunc main() {\n\tresponse, err := fetch.Delete(\"https://httpbin.zcorky.com/Delete\", \u0026fetch.Config{\n\t\tBody: map[string]interface{}{\n\t\t\t\"foo\":     \"bar\",\n\t\t\t\"foo2\":    \"bar2\",\n\t\t\t\"number\":  1,\n\t\t\t\"boolean\": true,\n\t\t\t\"array\": []string{\n\t\t\t\t\"foo3\",\n\t\t\t\t\"bar3\",\n\t\t\t},\n\t\t\t\"nest\": map[string]string{\n\t\t\t\t\"foo4\": \"bar4\",\n\t\t\t},\n\t\t},\n\t})\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n  fmt.Println(response.JSON())\n}\n```\n\n### Timeout\n\n```go\npackage main\n\nimport (\n  \"github.com/go-zoox/fetch\"\n)\n\nfunc main() {\n  response, err := fetch.Get(\"https://httpbin.zcorky.com/get\", \u0026fetch.Config{\n    Timeout: 5 * time.Second,\n  })\n  if err != nil {\n\t\tpanic(err)\n\t}\n\n  fmt.Println(response.JSON())\n}\n```\n\n### Proxy\n\n```go\npackage main\n\nimport (\n  \"github.com/go-zoox/fetch\"\n)\n\nfunc main() {\n  response, err := fetch.Get(\"https://httpbin.zcorky.com/ip\", \u0026fetch.Config{\n    Proxy: \"http://127.0.0.1:17890\",\n  })\n  if err != nil {\n\t\tpanic(err)\n\t}\n\n  fmt.Println(response.JSON())\n}\n```\n\n### Basic Auth\n\n```go\npackage main\n\nimport (\n  \"github.com/go-zoox/fetch\"\n)\n\nfunc main() {\n  response, err := fetch.Get(\"https://httpbin.zcorky.com/ip\", \u0026fetch.Config{\n    BasicAuth: \u0026fetch.BasicAuth{\n      Username: \"foo\",\n      Password: \"bar\",\n    },\n  })\n  if err != nil {\n\t\tpanic(err)\n\t}\n\n  fmt.Println(response.JSON())\n}\n```\n\n### Download\n\n```go\npackage main\n\nimport (\n  \"github.com/go-zoox/fetch\"\n)\n\nfunc main() {\n\tresponse, err := fetch.Download(\"https://httpbin.zcorky.com/image\", \"/tmp/image.webp\")\n  if err != nil {\n\t\tpanic(err)\n\t}\n}\n```\n\n### Upload\n\n```go\npackage main\n\nimport (\n  \"github.com/go-zoox/fetch\"\n)\n\nfunc main() {\n\t\tfile, _ := os.Open(\"go.mod\")\n\n\tresponse, err := Upload(\"https://httpbin.zcorky.com/upload\", file)\n  if err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Println(response.JSON())\n}\n```\n\n### Cancel\n\n```go\npackage main\n\nimport (\n  \"github.com/go-zoox/fetch\"\n)\n\nfunc main() {\n\tfile, _ := os.Open(\"go.mod\")\n\n\tctx, cancel := context.WithCancel(context.Background())\n\n\tf := fetch.New()\n\tf.SetBaseURL(\"https://httpbin.zcorky.com\")\n\tf.SetURL(\"/delay/3\")\n\tf.SetContext(ctx)\n\n\tgo func() {\n\t\t_, err := f.Execute()\n\t\tfmt.Println(err)\n\t}()\n\n\tcancel()\n}\n```\n\n## Depencencies\n\n- [gjson](github.com/tidwall/gjson) - Get JSON Whenever You Need, you don't\n  define type first。\n\n## Inspired By\n\n- [sindresorhus/got](https://github.com/sindresorhus/got) - 🌐 Human-friendly and powerful HTTP request library for Node.js\n- [axios/axios](https://github.com/axios/axios) - Promise based HTTP client for the browser and node.js\n- [mozillazg/request](https://github.com/mozillazg/request) - A\n  developer-friendly HTTP request library for Gopher\n- [monaco-io/request](https://github.com/monaco-io/request) - go request, go http client\n\n## License\n\nGoZoox is released under the [MIT License](./LICENSE).\n","funding_links":[],"categories":["Networking","Go","网络"],"sub_categories":["HTTP Clients","HTTP客户端"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgo-zoox%2Ffetch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgo-zoox%2Ffetch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgo-zoox%2Ffetch/lists"}