Skip to main content

latest
It is unknown whether this package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
It is unknown whether this package works with Cloudflare Workers
It is unknown whether this package works with Node.js
It is unknown whether this package works with Deno
It is unknown whether this package works with Bun
It is unknown whether this package works with Browsers
JSR Score
52%
Published
2 months ago (7.0.4)
type alias WrapFetchOptions

Properties

optional
fetch: fetch

your own fetch function. defaults to global fetch.

user agent header string

optional
timeout: number

if set, all requests will timeout after this amount of milliseconds passed

optional
headers: Headers

if set, will be used as default headers. new added headers will be added on top of these.

optional
baseURL: string | URL

if set, will be prepended to the target url using URL api.

optional
interceptors: Interceptors

interceptors can be used for validating request and response and throwing errors

optional
retry: number

if set, all requests will be retried this much

optional
retryDelay: number | RetryDelayFunction

retry delay in milliseconds. if you need non linear delays, you can do that by passing in a function instead of number. defaults to 500ms.

Add Package

deno add jsr:@jd1378/fetch-goody

Import symbol

import { type WrapFetchOptions } from "@jd1378/fetch-goody";

---- OR ----

Import directly with a jsr specifier

import { type WrapFetchOptions } from "jsr:@jd1378/fetch-goody";

Add Package

npx jsr add @jd1378/fetch-goody

Import symbol

import { type WrapFetchOptions } from "@jd1378/fetch-goody";

Add Package

yarn dlx jsr add @jd1378/fetch-goody

Import symbol

import { type WrapFetchOptions } from "@jd1378/fetch-goody";

Add Package

pnpm dlx jsr add @jd1378/fetch-goody

Import symbol

import { type WrapFetchOptions } from "@jd1378/fetch-goody";

Add Package

bunx jsr add @jd1378/fetch-goody

Import symbol

import { type WrapFetchOptions } from "@jd1378/fetch-goody";