{"id":21291891,"url":"https://github.com/idea2app/taro-fetch-polyfill","last_synced_at":"2025-07-11T16:30:57.817Z","repository":{"id":57748692,"uuid":"523837333","full_name":"idea2app/Taro-Fetch-polyfill","owner":"idea2app","description":"W3C fetch() API polyfill for Taro 3+","archived":false,"fork":false,"pushed_at":"2024-10-28T11:56:16.000Z","size":118,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-28T14:24:08.828Z","etag":null,"topics":["api","fetch","mini-app","mini-program","polyfill","taro","w3c","wechat"],"latest_commit_sha":null,"homepage":"https://idea2app.github.io/Taro-Fetch-polyfill/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/idea2app.png","metadata":{"files":{"readme":"ReadMe.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-08-11T19:01:35.000Z","updated_at":"2024-10-28T13:28:16.000Z","dependencies_parsed_at":"2022-08-27T00:11:24.306Z","dependency_job_id":null,"html_url":"https://github.com/idea2app/Taro-Fetch-polyfill","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idea2app%2FTaro-Fetch-polyfill","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idea2app%2FTaro-Fetch-polyfill/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idea2app%2FTaro-Fetch-polyfill/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idea2app%2FTaro-Fetch-polyfill/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/idea2app","download_url":"https://codeload.github.com/idea2app/Taro-Fetch-polyfill/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225741249,"owners_count":17516894,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["api","fetch","mini-app","mini-program","polyfill","taro","w3c","wechat"],"created_at":"2024-11-21T13:46:37.740Z","updated_at":"2024-11-21T13:46:38.424Z","avatar_url":"https://github.com/idea2app.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Taro Fetch polyfill\n\n[Taro][1] 3+ 非官方 W3C [`fetch()` API][2] 补丁\n\n[![NPM Dependency](https://img.shields.io/librariesio/github/idea2app/Taro-Fetch-polyfill.svg)][3]\n[![CI \u0026 CD](https://github.com/idea2app/Taro-Fetch-polyfill/actions/workflows/main.yml/badge.svg)][4]\n\n[![NPM](https://nodei.co/npm/taro-fetch-polyfill.png?downloads=true\u0026downloadRank=true\u0026stars=true)][5]\n\n## 用法\n\n\u003e ❗因小程序锁定了全局对象，无法采用标准的 polyfill 方式，只能用 ponyfill 来导入。\n\n```javascript\nimport { fetch } from 'taro-fetch-polyfill';\n\nfetch('https://api.github.com')\n    .then(response =\u003e response.json())\n    .then(console.log);\n```\n\n[1]: https://taro.jd.com/\n[2]: https://developer.mozilla.org/zh-CN/docs/Web/API/Fetch_API\n[3]: https://libraries.io/npm/taro-fetch-polyfill\n[4]: https://github.com/idea2app/Taro-Fetch-polyfill/actions/workflows/main.yml\n[5]: https://nodei.co/npm/taro-fetch-polyfill/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidea2app%2Ftaro-fetch-polyfill","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fidea2app%2Ftaro-fetch-polyfill","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidea2app%2Ftaro-fetch-polyfill/lists"}