RequestUrlError
The error requestUrlEx and requestUrlStream throw for a status code of 400 or higher.
Import:
import { RequestUrlError } from '@mnaoumov/obsidian-lib/request-url';Signature:
export class RequestUrlError extends ErrorExtends: Error
Properties
| Property | Type | Description |
|---|---|---|
| headers | Readonly<Record<string, string>> | The response headers. |
| method | string | The HTTP method. |
| status | number | The status code. |
| text | string | The response body as text. |
| url | string | The URL. |
Methods
| Method | Returns | Description |
|---|---|---|
| json() | unknown | Parses the response body as JSON. |
Links to this page: