| name | ofetch |
| description | A better fetch API. Works on node, browser, and workers. WHEN: make http requests, interact with rest apis. Triggers: use ofetch, install ofetch, how to use ofetch, make http request. |
ofetch
A better fetch API. Works on node, browser, and workers.
When to Use
- Make HTTP requests
- Interact with REST APIs
When NOT to Use
- Projects using Python or Rust (different ecosystem)
Quick Start
Install
npm install ofetch
Basic Usage
npx nypm i ofetch
import { ofetch } from "ofetch";
Key API
Project Info
- Language: TypeScript, JavaScript
- License: MIT
- Tests: Yes
File Structure
├── examples/
│ ├── body.mjs
│ ├── error-handling.mjs
│ ├── first-request.mjs
│ ├── headers.mjs
│ ├── methods.mjs
│ ├── proxy.mjs
│ ├── query-string.mjs
│ ├── README.md
│ └── type-safety.ts
├── src/
│ ├── base.ts
│ ├── error.ts
│ ├── fetch.ts
│ ├── index.ts
│ ├── types.ts
│ ├── utils.ts
│ └── utils.url.ts
├── test/
│ ├── index.test.ts
Generated by repo2skill