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

x/hex/src/service/deps.ts>oak.helpers.getQuery

An ecosystem delivering practices, philosophy and portability.
Go to Latest
function oak.helpers.getQuery
import { oak } from "https://deno.land/x/hex@0.5.15/src/service/deps.ts";
const { getQuery } = oak.helpers;

Given a context, return the .request.url.searchParams as a Map of keys and values of the params.

Parameters

ctx: Context | RouterContext<string>
options: GetQueryOptionsAsMap

Returns

Map<string, string>

Given a context, return the .request.url.searchParams as a record object of keys and values of the params.

Parameters

ctx: Context | RouterContext<string>
optional
options: GetQueryOptionsBase

Returns

Record<string, string>