/** * `POST` an `application/x-www-form-urlencoded` body and parse the JSON * response — the token, PAR, and revocation endpoints. `params` values * are URL-encoded by {@link URLSearchParams}. * * @param {string} url * @param {Record} params * @param {HttpOptions} [options] * @returns {Promise>} */ export function postForm(url: string, params: Record, options?: HttpOptions): Promise>; /** * `GET` a JSON resource, optionally with a bearer token — the userinfo * and discovery endpoints. * * @param {string} url * @param {{ token?: string }} [auth] * @param {HttpOptions} [options] * @returns {Promise>} */ export function getJson(url: string, auth?: { token?: string; }, options?: HttpOptions): Promise>; export type HttpOptions = { /** * request timeout in ms (default 8000) */ timeout?: number | undefined; /** * max response bytes accepted (default 1 MB) */ maxResponseSize?: number | undefined; /** * caller-provided signal, combined with the timeout */ signal?: AbortSignal; /** * extra request headers */ headers?: Record | undefined; /** * {@link ErrorCode} used for a non-2xx response */ errorCode?: string | undefined; };