{"id":22938415,"url":"https://github.com/jacraig/request","last_synced_at":"2026-05-28T02:02:38.881Z","repository":{"id":230082421,"uuid":"778432115","full_name":"JaCraig/request","owner":"JaCraig","description":"@jacraig/request is a wrapper around fetch that adds functionality including caching, retry, and timeouts","archived":false,"fork":false,"pushed_at":"2026-02-02T14:19:21.000Z","size":3086,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-03T03:20:40.017Z","etag":null,"topics":["ajax","api","fetch"],"latest_commit_sha":null,"homepage":"https://jacraig.github.io/request/","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/JaCraig.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","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":"2024-03-27T17:59:20.000Z","updated_at":"2026-02-02T14:19:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"967fd111-8594-406c-ac5b-4fe1807b70ad","html_url":"https://github.com/JaCraig/request","commit_stats":null,"previous_names":["jacraig/request"],"tags_count":169,"template":false,"template_full_name":null,"purl":"pkg:github/JaCraig/request","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JaCraig%2Frequest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JaCraig%2Frequest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JaCraig%2Frequest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JaCraig%2Frequest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JaCraig","download_url":"https://codeload.github.com/JaCraig/request/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JaCraig%2Frequest/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29184977,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-07T00:44:15.062Z","status":"online","status_checked_at":"2026-02-07T02:00:07.217Z","response_time":63,"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":["ajax","api","fetch"],"created_at":"2024-12-14T12:17:52.826Z","updated_at":"2026-05-28T02:02:38.874Z","avatar_url":"https://github.com/JaCraig.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @jacraig/request\n\n[![NPM Publish](https://github.com/JaCraig/request/actions/workflows/node-publish.yml/badge.svg)](https://github.com/JaCraig/request/actions/workflows/node-publish.yml)\n\n`@jacraig/request` is a powerful yet lightweight library designed to simplify HTTP requests using the native `fetch` API while adding functionality such as caching, retry logic, and timeouts. It aims to provide developers with a convenient and flexible solution for handling HTTP requests in JavaScript and TypeScript applications.\n\n## Features\n\n- **Caching**: Cache responses to improve performance and reduce network requests.\n- **Retry logic**: Automatically retry failed requests with customizable retry options.\n- **Timeouts**: Set timeouts for requests to prevent hanging and improve overall application responsiveness.\n\n## Installation\n\nYou can install `@jacraig/request` via npm:\n\n```bash\nnpm install @jacraig/request\n```\n\n## Usage\n\nHere's a basic example of how you can use `@jacraig/request` to make a fetch request:\n\n```typescript\nimport { Request } from \"@jacraig/request\";\n\nlet returnValue = await Request.get(\"https://jsonplaceholder.somewhere.com/post.json\").send();\n```\n\nIn order to use caching, retry logic, or timeouts, you can use the extra methods on the returned Request object to set options:\n\n```typescript\nimport { Request, StorageMode } from \"@jacraig/request\";\n\nlet returnValue = await Request.get(\"https://jsonplaceholder.somewhere.com/post.json\")\n    .withStorageMode(StorageMode.StorageAndUpdate)\n    .withTimeout(5000)\n    .withRetryAttempts(3)\n    .send();\n```\n\nIf you prefer to use callbacks instead of promises, you can do so by passing a callback function to the `onSuccess` method:\n\n```typescript\nimport { Request } from \"@jacraig/request\";\n\nRequest.get(\"https://jsonplaceholder.somewhere.com/post.json\")\n    .onSuccess((response) =\u003e {\n        console.log(response);\n    })\n    .send();\n```\n\n## Documentation\n\nFor more detailed information on how to use `@jacraig/request`, please refer to the [documentation](https://jacraig.github.io/request/) on GitHub Pages.\n\n## License\n\n@jacraig/request is licensed under the [Apache 2.0 License](https://github.com/JaCraig/request/blob/main/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacraig%2Frequest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjacraig%2Frequest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacraig%2Frequest/lists"}