Skip to main content

A HTTP/1 compatible fetch implementation for Deno

This package works with Deno
This package works with Deno
JSR Score
94%
Published
3 months ago (0.1.2)
function grab
grab(
input: ,
init?: RequestInit | undefined,
): Promise<Response>

Grabs a resource from the network. It returns a Promise that resolves to the Response to that Request, whether it is successful or not.

Examples

Example 1

const response = await grab("https://httpbin.org/get");
if (response.ok) {
 const json = await response.json();
 console.log(json);
}

Parameters

input:
optional
init: RequestInit | undefined

Return Type

Add Package

deno add @gug/grab

Import symbol

import { grab } from "@gug/grab";