RequestUrlExParams
Parameters for requestUrlEx.
Import:
import type { RequestUrlExParams } from '@mnaoumov/obsidian-lib/request-url';Signature:
export interface RequestUrlExParamsProperties
| Property | Type | Description |
|---|---|---|
| abortSignal? | AbortSignal | undefined | Aborts the request. The promise rejects with the signal's reason. |
| body? | RequestUrlExBody | undefined | The request body. |
| contentType? | string | undefined | The 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>> | undefined | The request headers. |
| method? | string | undefined | The HTTP method. Defaults to GET. |
| shouldThrowOnHttpError? | boolean | undefined | Whether to throw a RequestUrlError when the status code is 400 or higher. Defaults to true. |
| timeoutInMilliseconds? | number | undefined | The timeout in milliseconds. The promise rejects with a TimeoutError DOMException once it elapses. |
| url | string | The URL. Only http: and https: URLs are accepted. |
Links to this page: