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
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"