Type alias HttpFetchAgent
HttpFetchAgent: ((this: void, next: ((this: void, request?: Request) => OnEvent<[Response]>), request: Request) => EventSender<[Response]>)
Type declaration
-
- (this: void, next: ((this: void, request?: Request) => OnEvent<[Response]>), request: Request): EventSender<[Response]>
-
Parameters
-
this: void
-
next: ((this: void, request?: Request) => OnEvent<[Response]>)
-
- (this: void, request?: Request): OnEvent<[Response]>
-
Parameters
-
this: void
-
Optional
request: Request
Returns OnEvent<[Response]>
-
request: Request
Returns EventSender<[Response]>
HTTP fetch agent signature.
The agent can be used to alter HttpFetch processing. For that it should be registered in appropriate context.
All registered agents are organized into chain. The first agent in chain is called by HttpFetch.
Returns
An
EventSender
of response object(s). It is returned either to preceding agent in chain, or as a result of HttpFetch call.