{"id":15631958,"url":"https://github.com/ianwalter/http","last_synced_at":"2025-04-30T03:49:37.471Z","repository":{"id":33931153,"uuid":"149767810","full_name":"ianwalter/http","owner":"ianwalter","description":"A convenience wrapper around the fetch API","archived":false,"fork":false,"pushed_at":"2023-10-17T16:53:38.000Z","size":5593,"stargazers_count":4,"open_issues_count":14,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-30T03:49:29.964Z","etag":null,"topics":["fetch","http"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ianwalter.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":"ianwalter"}},"created_at":"2018-09-21T13:32:34.000Z","updated_at":"2023-03-04T05:53:33.000Z","dependencies_parsed_at":"2024-10-23T01:59:53.428Z","dependency_job_id":null,"html_url":"https://github.com/ianwalter/http","commit_stats":{"total_commits":292,"total_committers":7,"mean_commits":"41.714285714285715","dds":0.654109589041096,"last_synced_commit":"452e4783b61797dc2859231ea1f82f999200b45c"},"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ianwalter%2Fhttp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ianwalter%2Fhttp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ianwalter%2Fhttp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ianwalter%2Fhttp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ianwalter","download_url":"https://codeload.github.com/ianwalter/http/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251638760,"owners_count":21619663,"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","http"],"created_at":"2024-10-03T10:42:10.272Z","updated_at":"2025-04-30T03:49:37.448Z","avatar_url":"https://github.com/ianwalter.png","language":"JavaScript","readme":"# @ianwalter/http\n\u003e A convenience wrapper around the [fetch][fetchUrl] API\n\n[![npm page][npmImage]][npmUrl]\n\n## Installation\n\n```console\nyarn add @ianwalter/http\n```\n\n## Usage\n\n```js\nimport { http } from '@ianwalter/http'\n\n// Add a new header to the global http instance.\nhttp.options.headers = { 'csrf-token': 'abc123' }\n\n// Send a POST request with some data.\nconst response = await http.post('/api/thing', { body: { complete: true } })\n```\n\n## Intercepting requests and responses\n\n```js\nhttp.after = (url, init, response) =\u003e ({\n  ...response,\n  ok: false,\n  status: 401,\n  statusText: 'Unauthorized'\n})\n```\n\n## License\n\nApache 2.0 with Commons Clause - See [LICENSE][licenseUrl]\n\n\u0026nbsp;\n\nCreated by [Ian Walter](https://iankwalter.com)\n\n[fetchUrl]: https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API\n[npmImage]: https://img.shields.io/npm/v/@ianwalter/http.svg\n[npmUrl]: https://www.npmjs.com/package/@ianwalter/http\n[licenseUrl]: https://github.com/ianwalter/http/blob/main/LICENSE\n","funding_links":["https://github.com/sponsors/ianwalter"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fianwalter%2Fhttp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fianwalter%2Fhttp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fianwalter%2Fhttp/lists"}