{"id":15509678,"url":"https://github.com/willin/fetch-pro","last_synced_at":"2026-02-19T14:01:58.923Z","repository":{"id":46250501,"uuid":"420079986","full_name":"willin/fetch-pro","owner":"willin","description":"Elegant Fetch Lib with Power","archived":false,"fork":false,"pushed_at":"2021-11-04T01:55:50.000Z","size":120,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-16T00:37:43.374Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/willin.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-10-22T11:53:37.000Z","updated_at":"2021-11-04T03:40:10.000Z","dependencies_parsed_at":"2022-09-07T16:50:22.932Z","dependency_job_id":null,"html_url":"https://github.com/willin/fetch-pro","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/willin/fetch-pro","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willin%2Ffetch-pro","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willin%2Ffetch-pro/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willin%2Ffetch-pro/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willin%2Ffetch-pro/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/willin","download_url":"https://codeload.github.com/willin/fetch-pro/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willin%2Ffetch-pro/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279005428,"owners_count":26083883,"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","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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-10-02T09:43:29.014Z","updated_at":"2025-10-10T21:45:43.041Z","avatar_url":"https://github.com/willin.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fetch-pro\n\n[![willin](https://img.shields.io/github/followers/willin.svg?label=Followers)](https://github.com/willin) [![npm](https://img.shields.io/npm/v/fetch-pro.svg?style=plastic)](https://npmjs.org/package/fetch-pro) [![npm](https://img.shields.io/npm/dm/fetch-pro.svg?style=plastic)](https://npmjs.org/package/fetch-pro) [![npm](https://img.shields.io/npm/dt/fetch-pro.svg?style=plastic)](https://npmjs.org/package/fetch-pro)\n\nElegant Fetch Lib with Power\n\n## Usage\n\n### abortableFetch\n\n```ts\nimport { abortableFetch } from 'fetch-pro';\n\nasync function demo() {\n  const client = abortableFetch(\n    {\n      method: 'post',\n      url: 'xxx'\n    },\n    {\n      data: {}\n    }\n  );\n\n  // abortable\n  client.abort();\n\n  // normal request\n  const result = await client.ready;\n}\n```\n\n### FetchPro\n\nFetchType:\n\n- Prevent\n- CancelAndResend\n\n```ts\nimport { FetchPro, FetchType } from 'fetch-pro';\n\nasync function demo() {\n  const client = new FetchPro(FetchType.CancelAndResend);\n  client.fetch('url');\n  client.fetch(\n    {\n      method: 'get',\n      url: 'xxx'\n    },\n    {}\n  );\n\n  const result = await client.ready;\n\n  // cancel manually\n  client.abort();\n}\n```\n\n## LICENSE\n\nApache-2.0\n\n![qr](https://user-images.githubusercontent.com/1890238/89126156-0f3eeb80-d516-11ea-9046-5a3a5d59b86b.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwillin%2Ffetch-pro","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwillin%2Ffetch-pro","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwillin%2Ffetch-pro/lists"}