Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/simple_utility/mod.pure.ts>fetchExtend

Simplify processing for Deno.
Latest
function fetchExtend
import { fetchExtend } from "https://deno.land/x/simple_utility@v2.3.2/mod.pure.ts";

Extended fetch function that can specify response type directly.

Examples

Example 1

const response = await fetchExtend("./asset", "byte");

Type Parameters

T extends keyof ReturnTypeMap

Parameters

path: string
type: T
optional
option: FetchInit

Returns

Promise<ReturnTypeMap[T]>