Fetchet is a minimal wrapper around the browser-native fetch, using the same API with a few minor configurations and additional options. The parameter

Search code, repositories, users, issues, pull requests...

submited by
Style Pass
2025-08-02 22:30:11

Fetchet is a minimal wrapper around the browser-native fetch, using the same API with a few minor configurations and additional options.

The parameters option (an object) in the request options is automatically parsed into URL search params string and appended to the request URL.

The json option (a boolean) is set to true by default. This means you don't need to manually set headers: { 'Content-Type': 'application/json' } or use JSON.stringify(body) for POST, PUT, or PATCH requests. If you want to send the body in a non-JSON format, set json to false.

If you have suggestions for how this project could be improved, or want to report a bug, feel free to open an issue! We welcome all contributions.

I wrote a fetch wrapper for a small side project, and instead of copying and pasting that code, I decided to expand on it and turn it into a public package.

Leave a Comment
Related Posts