Skip to content

RequestUrlExParams

Parameters for requestUrlEx.

Import:

import type { RequestUrlExParams } from '@mnaoumov/obsidian-lib/request-url';

Signature:

export interface RequestUrlExParams

Properties

PropertyTypeDescription
abortSignal?AbortSignal | undefinedAborts the request. The promise rejects with the signal's reason.
body?RequestUrlExBody | undefinedThe request body.
contentType?string | undefinedThe content type. When omitted, it is derived from the body: a FormData body gets multipart/form-data with its boundary, a URLSearchParams body application/x-www-form-urlencoded and a Blob body its own type — unless RequestUrlExParams.headers already carries a Content-Type.
headers?Readonly<Record<string, string>> | undefinedThe request headers.
method?string | undefinedThe HTTP method. Defaults to GET.
shouldThrowOnHttpError?boolean | undefinedWhether to throw a RequestUrlError when the status code is 400 or higher. Defaults to true.
timeoutInMilliseconds?number | undefinedThe timeout in milliseconds. The promise rejects with a TimeoutError DOMException once it elapses.
urlstringThe URL. Only http: and https: URLs are accepted.

Links to this page: