Extends: undici.Dispatcher
Agent allow dispatching requests against multiple different origins.
Requests are not guaranteed to be dispatched in order of invocation.
Arguments:
- options
AgentOptions(optional)
Returns: Agent
Extends: PoolOptions
- factory
(origin: URL, opts: Object) => Dispatcher- Default:(origin, opts) => new Pool(origin, opts) - maxRedirections
Integer- Default:0. The number of HTTP redirection to follow unless otherwise specified inDispatchOptions. - interceptors
{ Agent: DispatchInterceptor[] }- Default:[RedirectInterceptor]- A list of interceptors that are applied to the dispatch method. Additional logic can be applied (such as, but not limited to: 302 status code handling, authentication, cookies, compression and caching). Note that the behavior of interceptors is Experimental and might change at any given time.
Implements Client.closed
Implements Client.destroyed
Implements Dispatcher.close([callback]).
Implements Dispatcher.destroy([error, callback]).
Implements Dispatcher.dispatch(options, handler).
Extends: DispatchOptions
- origin
string | URL - maxRedirections
Integer.
Implements Dispatcher.destroy([error, callback]).
See Dispatcher.connect(options[, callback]).
Implements Dispatcher.dispatch(options, handler).
See Dispatcher.pipeline(options, handler).
See Dispatcher.request(options [, callback]).