on method

MethodPrepare on(
  1. String method,
  2. Handler handler, [
  3. List<Middleware>? pipeline,
  4. List<String>? acceptedContentType,
])

Implementation

MethodPrepare on(String method, Handler handler,
    [List<Middleware>? pipeline, List<String>? acceptedContentType]) {
  var i = _path.methods[method] = PathMethod(
    [...parentPipeline, ...?pipeline],
    handler: handler,
    acceptedContentType: acceptedContentType ?? [],
  );
  return MethodPrepare(i);
}