Updated test
This commit is contained in:
@ -26,6 +26,18 @@ client.index({
|
||||
body: { hello: 'world' }
|
||||
}, (err: Error | null, result: ApiResponse) => {})
|
||||
|
||||
// request options
|
||||
client.index({
|
||||
index: 'test',
|
||||
type: 'test',
|
||||
id: 'test',
|
||||
body: { hello: 'world' }
|
||||
}, {
|
||||
maxRetries: 2,
|
||||
ignore: [404],
|
||||
requestTimeout: 2000
|
||||
}, (err: Error | null, result: ApiResponse) => {})
|
||||
|
||||
// Promises
|
||||
client.info()
|
||||
.then((result: ApiResponse) => {})
|
||||
@ -39,3 +51,17 @@ client.index({
|
||||
})
|
||||
.then((result: ApiResponse) => {})
|
||||
.catch((err: Error) => {})
|
||||
|
||||
// request options
|
||||
client.index({
|
||||
index: 'test',
|
||||
type: 'test',
|
||||
id: 'test',
|
||||
body: { hello: 'world' }
|
||||
}, {
|
||||
maxRetries: 2,
|
||||
ignore: [404],
|
||||
requestTimeout: 2000
|
||||
})
|
||||
.then((result: ApiResponse) => {})
|
||||
.catch((err: Error) => {})
|
||||
|
||||
Reference in New Issue
Block a user