Add the possibility to provide a custom HTTP client and custom RequestOptions
bidoubiwa opened this issue · comments
cvermand commented
Description
As per the in meilisearch-js
of this PR meilisearch/meilisearch-js#1461, it is now possible to provide a custom HTTP client and custom Request options.
The possibility of providing these two options should definitely be added in instant-meilisearch
.
For example like this:
const searchClient = instantMeiliSearch('http://localhost:7700', 'x', {
keepZeroFacets: true,
httpClient: async (url, init) => {
const result = await fetch(url, init)
return result.json()
},
requestOptions: {
keepalive: true
}
})
Fixes: #928