forwardUri method

void forwardUri(
  1. String uri, [
  2. Map<String, String>? args,
  3. int? line
])

Forward to the given URI.

Implementation

void forwardUri(String uri, [Map<String, String>? args, int? line]) {
  if (verbose) _info("Forward $uri", line);

  _write("\n${_current.pre}return connect.forward(");
  final emptyArgs = args == null || args.isEmpty;
  if (!emptyArgs)
    _write("Rsp.cat(");
  _write("${toEL(uri, direct: false)}");
  if (!emptyArgs) {
    _catArgs(args);
    _write(')');
  }
  _writeln(");${_getLineNumberComment(line)}");
}