Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

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

Full-stack Deno framework for building business web apps like internal tools, dashboards, admin panels and automated workflows.
Go to Latest
function fetchValues
import { fetchValues } from "https://deno.land/x/netzo@0.4.72/plugins/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