[Backport 7.x] The agent function should take the Connection contructor options as argument (#1334)
Co-authored-by: Tomas Della Vedova <delvedor@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
34dedb8119
commit
dd8ee9056b
@ -149,7 +149,9 @@ const client = new Client({
|
||||
|
||||
const client = new Client({
|
||||
node: 'http://localhost:9200',
|
||||
agent: () => new CustomAgent()
|
||||
// the function takes as parameter the option
|
||||
// object passed to the Connection constructor
|
||||
agent: (opts) => new CustomAgent()
|
||||
})
|
||||
|
||||
const client = new Client({
|
||||
|
||||
Reference in New Issue
Block a user