Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/netzo/auth/utils/http.ts>fetchValues

Deno-powered framework for building business web apps
Go to Latest
function fetchValues
import { fetchValues } from "https://deno.land/x/netzo@0.4.10/auth/utils/http.ts";

Returns the values and cursor for the resource of a given endpoint. In the backend, the request handler collects these values and cursor by iterating through a Deno.KvListIterator

Examples

Example 1

import { fetchValues } from "../../../../auth/utils/http.ts";
import type { User } from "../../../../auth/utils/db.ts";

const body = await fetchValues<User>("https://hunt.deno.land/api/users", "12345");
body.values[0].id; // Returns "13f34b7e-5563-4001-98ed-9ee04d7af717"
body.values[0].url; // Returns "http://example.com"
body.cursor; // Returns "12346"

Parameters

endpoint: string
cursor: string