Type Alias MainRequestOptions

MainRequestOptions: {
    body?: string | boolean | number | object | null;
    contentType?: string;
    extraRequestInit?: ExtraRequestInit;
    method?: string;
    params?: URLSearchParamsRecord;
    path: string;
}

Main options of a request.

Type declaration

  • Optionalbody?: string | boolean | number | object | null

    The body of the request.

    This only really supports string for now (any other type gets stringified) but it could support more in the future. https://developer.mozilla.org/en-US/docs/Web/API/RequestInit#body

  • OptionalcontentType?: string

    Content-Type passed to request Headers.

  • OptionalextraRequestInit?: ExtraRequestInit

    An extra, more limited RequestInit, that may override some of the options.

  • Optionalmethod?: string

    The REST method of the request.

  • Optionalparams?: URLSearchParamsRecord

    The search parameters of the URL.

  • path: string

    The path or subpath of the URL to make a request to.