Skip to main content

latest
This package works with BunIt is unknown whether this package works with Cloudflare Workers, Node.js, Deno, 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
This package works with Bun
It is unknown whether this package works with Browsers
JSR Score
82%
Published
3 months ago (0.2.3)
class SfResponse

SfResponse is a wrapper on the native fetch Response object This allows client to get both the http status and payload with a single await call it ancapculates the results of both both of the statments below const response = await fetch(url, payload); const body = await response.json(); This macks the package suitable for slow synchronous operations which are easy to to reason about for

Constructors

new
SfResponse(
success: boolean,
status: number,
msg: string,
body: any,
)

Properties

Add Package

deno add jsr:@pogilvie/sf

Import symbol

import { SfResponse } from "@pogilvie/sf";

---- OR ----

Import directly with a jsr specifier

import { SfResponse } from "jsr:@pogilvie/sf";

Add Package

npx jsr add @pogilvie/sf

Import symbol

import { SfResponse } from "@pogilvie/sf";

Add Package

yarn dlx jsr add @pogilvie/sf

Import symbol

import { SfResponse } from "@pogilvie/sf";

Add Package

pnpm dlx jsr add @pogilvie/sf

Import symbol

import { SfResponse } from "@pogilvie/sf";

Add Package

bunx jsr add @pogilvie/sf

Import symbol

import { SfResponse } from "@pogilvie/sf";