getForRequest method

HttpAction getForRequest(
  1. HttpRequest request
)

Implementation

HttpAction getForRequest(HttpRequest request) {
  List<String> pathArgs = new List<String>.from(request.uri.pathSegments);
  String? className = this.mapPathToClassName(pathArgs);
  if (className == null) {
    throw new HttpException(HttpStatus.notFound, request.uri.toString());
  }
  HttpAction action = createAction(className);
  action.request = request;
  return action;
}