HttpConnect.chain constructor

HttpConnect.chain(
  1. HttpConnect connect, {
  2. bool inclusion = true,
  3. String? uri,
  4. HttpRequest? request,
  5. HttpResponse? response,
})

Instantiates a connection that will be used to include or forward to

  • another request handler.
    • uri - the URI to chain with. If omitted, it is the same as connect's.
  • It can contain the query string too.
    • inclusion - whether it is used for inclusion. If true,
  • any modification to connect.response.headers is ignored.

Implementation

factory HttpConnect.chain(HttpConnect connect, {bool inclusion = true,
    String? uri, HttpRequest? request, HttpResponse? response}) {
  return inclusion ?
    new _IncludedConnect(connect, request, response, uri):
    new _ForwardedConnect(connect, request, response, uri);
}