Skip to content

Meilisearch JS / index / MainRequestOptions

Type Alias: MainRequestOptions

MainRequestOptions = object

Defined in: src/types/types.ts:84

Main options of a request.

Properties

body?

optional body?: string | boolean | number | object | null

Defined in: src/types/types.ts:104

The body of the request.

Remarks

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


contentType?

optional contentType?: string

Defined in: src/types/types.ts:95

Content-Type passed to request Headers.


extraRequestInit?

optional extraRequestInit?: ExtraRequestInit

Defined in: src/types/types.ts:109

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


method?

optional method?: string

Defined in: src/types/types.ts:88

The REST method of the request.


params?

optional params?: URLSearchParamsRecord

Defined in: src/types/types.ts:90

The search parameters of the URL.


path

path: string

Defined in: src/types/types.ts:86

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