Skip to main content
Home
Works with
This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
This package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
This package works with Browsers
JSR Score94%
Downloads5/wk
Published4 weeks ago (0.4.3)

A type-safe fetch wrapper with Standard Schema validation.

type alias FetchDefaults

Internal defaults used by fetchInternal

Properties

Base URL to prepend to all requests

Default headers to include in all requests (can be overridden per request)

Default query/search params applied to every request (can be overridden per request)

Whether to throw a FetchError on HTTP errors (non-2xx responses)

Whether to throw a ValidationError on validation errors

Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@zap-studio/fetch

Import symbol

import { type FetchDefaults } from "@zap-studio/fetch/types";
or

Import directly with a jsr specifier

import { type FetchDefaults } from "jsr:@zap-studio/fetch/types";

Add Package

pnpm i jsr:@zap-studio/fetch
or (using pnpm 10.8 or older)
pnpm dlx jsr add @zap-studio/fetch

Import symbol

import { type FetchDefaults } from "@zap-studio/fetch/types";

Add Package

yarn add jsr:@zap-studio/fetch
or (using Yarn 4.8 or older)
yarn dlx jsr add @zap-studio/fetch

Import symbol

import { type FetchDefaults } from "@zap-studio/fetch/types";

Add Package

vlt install jsr:@zap-studio/fetch

Import symbol

import { type FetchDefaults } from "@zap-studio/fetch/types";

Add Package

npx jsr add @zap-studio/fetch

Import symbol

import { type FetchDefaults } from "@zap-studio/fetch/types";

Add Package

bunx jsr add @zap-studio/fetch

Import symbol

import { type FetchDefaults } from "@zap-studio/fetch/types";