feat: add support for querystring in options object (#779)
In very few cases, some API uses the same key for both url and query params, such as the bulk method. The client is not designed to handle such cases since accepts both url and query keys in the same object, and the url parameter will always take precedence. This pr fixes this edge case by adding a `querystring` key in the options object. Fixes: https://github.com/elastic/elasticsearch-js/pull/778 ```js client.bulk({ index: 'index', type: '_doc', body: [...] }, { querystring: { type: '_doc' } }, console.log) ```
This commit is contained in:
committed by
delvedor
parent
a3e3d57247
commit
68c4dd29fb
@ -128,7 +128,9 @@ The supported *request specific options* are:
|
||||
requestTimeout: number, // client default
|
||||
maxRetries: number, // default `5`
|
||||
asStream: boolean, // default `false`
|
||||
headers: object // default `null`
|
||||
compression: string, // default `false`
|
||||
headers: object, // default `null`
|
||||
querystring: object // default `null`
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user