Appearance
@loontail/minecraft-kit / HttpRequestOptions
Type Alias: HttpRequestOptions
ts
type HttpRequestOptions = {
acceptNonOk?: boolean;
body?: HttpRequestBody;
headers?: HttpHeaders;
method?: HttpMethod;
noCache?: boolean;
signal?: AbortSignal;
timeoutMs?: number;
};Defined in: src/types/http.ts:33
Options for an HTTP request.
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
acceptNonOk? | readonly | boolean | When true, the client returns the response even for non-2xx statuses instead of throwing. Useful for callers that must inspect the body of error responses (e.g. OAuth polling endpoints that return 400 with structured JSON like {"error":"authorization_pending"}). | src/types/http.ts:49 |
body? | readonly | HttpRequestBody | Request body. Ignored for GET. | src/types/http.ts:42 |
headers? | readonly | HttpHeaders | - | src/types/http.ts:34 |
method? | readonly | HttpMethod | HTTP method. Defaults to GET. | src/types/http.ts:40 |
noCache? | readonly | boolean | When true, do not consult the in-memory cache. | src/types/http.ts:38 |
signal? | readonly | AbortSignal | - | src/types/http.ts:35 |
timeoutMs? | readonly | number | - | src/types/http.ts:36 |