{"id":20806827,"url":"https://github.com/fed/fetch-wrapper","last_synced_at":"2026-04-29T05:04:59.762Z","repository":{"id":85048376,"uuid":"253766716","full_name":"fed/fetch-wrapper","owner":"fed","description":null,"archived":false,"fork":false,"pushed_at":"2020-04-07T11:08:29.000Z","size":1,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-18T13:38:11.640Z","etag":null,"topics":["fetch","fetch-api"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/fed.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-04-07T10:57:11.000Z","updated_at":"2020-04-14T06:55:56.000Z","dependencies_parsed_at":"2023-03-03T00:45:28.654Z","dependency_job_id":null,"html_url":"https://github.com/fed/fetch-wrapper","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fed%2Ffetch-wrapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fed%2Ffetch-wrapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fed%2Ffetch-wrapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fed%2Ffetch-wrapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fed","download_url":"https://codeload.github.com/fed/fetch-wrapper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243152875,"owners_count":20244657,"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":["fetch","fetch-api"],"created_at":"2024-11-17T19:27:26.625Z","updated_at":"2025-12-26T05:03:13.520Z","avatar_url":"https://github.com/fed.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fetch-wrapper\n\nA simple fetch wrapper inspired on [axios](https://github.com/axios/axios) and [this post](https://kentcdodds.com/blog/replace-axios-with-a-simple-custom-fetch-wrapper) by Kent C. Dodds.\n\n## Usage examples\n\n### apiClient.get(endpoint, options)\n\n```js\napiClient\n    .get('https://api.github.com/users')\n    .then(data =\u003e console.log(data))\n    .catch(err =\u003e console.error(err));\n```\n\nYou can also pass in your authorization headers in case the endpoint is protected:\n\n```js\nconst token = 'eyJhbGciOiJIv5cCI6IkpXVCJ9...';\nconst headers = {\n'Authorization': `Bearer ${token}`\n};\n\napiClient\n    .get('https://rawr.com/your-protected-endpoint', { headers })\n    .then(data =\u003e console.log(data))\n    .catch(err =\u003e console.error(err));\n```\n\n## apiClient.post(endpoint, body, options)\n\n```js\nconst token = 'eyJhbGciOiJIv5cCI6IkpXVCJ9...';\nconst headers = {\n'Authorization': `Bearer ${token}`\n};\nconst body = {\n    foo: 'rawr'\n};\n\napiClient\n    .post('https://rawr.com/something', body, { headers })\n    .then(data =\u003e console.log(data))\n    .catch(err =\u003e console.error(err));\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffed%2Ffetch-wrapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffed%2Ffetch-wrapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffed%2Ffetch-wrapper/lists"}