Skip to content

@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

PropertyModifierTypeDescriptionDefined in
acceptNonOk?readonlybooleanWhen 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?readonlyHttpRequestBodyRequest body. Ignored for GET.src/types/http.ts:42
headers?readonlyHttpHeaders-src/types/http.ts:34
method?readonlyHttpMethodHTTP method. Defaults to GET.src/types/http.ts:40
noCache?readonlybooleanWhen true, do not consult the in-memory cache.src/types/http.ts:38
signal?readonlyAbortSignal-src/types/http.ts:35
timeoutMs?readonlynumber-src/types/http.ts:36

MIT License