Superagent is widely used and it can easily be made to understand kerberos, in-house CAs and more. This is designed to allow you to pass in any superagent like-object as well as get a callback before the request is sent so you can take an action per request (e.g. set a Authenticate token).
const elasticsearch = ;const SuperagentConnector = ;client =hostlog: 'debug'connectionClass: SuperagentConnector;
const elasticsearch = ;const SuperagentConnector = ;const beforeEachRequest = asyncconst token = await ;r;return;;client =hostlog: 'debug'connectionClass: SuperagentConnectorsuperagentConfig: beforeEachRequest;
In the config of
elasticsearch, pass a
superagentConfig config object. Parameters documented in the constructor,
as well as tested in