Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide the possibility of adding requestOptions on any method performing a HTTP request #1476

Open
bidoubiwa opened this issue Apr 4, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@bidoubiwa
Copy link
Contributor

Currently, as per #1461 it is now possible to provide a custom httpClient and requestOptions when instanciating your Client.

See example:

test(`${permission} key: Create client with custom headers (object)`, async () => {
const key = await getKey(permission)
const client = new MeiliSearch({
...config,
apiKey: key,
requestConfig: {
headers: {
Expect: '200-OK',
},
},
})
expect(client.httpRequest.headers['Expect']).toBe('200-OK')
const health = await client.isHealthy()
expect(health).toBe(true)
})

Ideally, we would like to be able to provide the requestOptions on any method that ultimately performs an HTTP call.

See example with algoliasearch

@bidoubiwa bidoubiwa added the enhancement New feature or request label Apr 4, 2023
@bidoubiwa bidoubiwa changed the title Provide the possibility of adding requestOptions on every http call Provide the possibility of adding requestOptions on any method performing a HTTP call Apr 4, 2023
@bidoubiwa bidoubiwa changed the title Provide the possibility of adding requestOptions on any method performing a HTTP call Provide the possibility of adding requestOptions on any method performing a HTTP request Apr 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant