Ofetch Client Pitfalls

Use when code calls an API with ofetch (a fetch wrapper for Node, browsers and workers): the retry defaults (one retry, none for POST, PUT, PATCH and DELETE, and a custom count that retries everything), the timeout that is off by default, thrown errors and error.data, ignoreResponseError, response parsing and binary or streamed bodies, JSON bodies and automatic headers, interceptors, shared defaults with ofetch.create (one-level clone, nested headers), query and baseURL merging, and typed responses.

techmefr Updated

File contents

techmefr/mentis commit 3e30459c03

Frequently asked questions

npx get-skill add techmefr/ofetch-client-pitfalls