@Override
    public final HttpResponse serve(ServiceRequestContext ctx, HttpRequest req) throws Exception {
        switch (req.method()) {
            case OPTIONS:
                return doOptions(ctx, req);
            case GET:
                return doGet(ctx, req);
            case HEAD:
                return doHead(ctx, req);
            case POST:
                return doPost(ctx, req);
            case PUT:
                return doPut(ctx, req);
            case PATCH:
                return doPatch(ctx, req);
            case DELETE:
                return doDelete(ctx, req);
            case TRACE:
                return doTrace(ctx, req);
            case CONNECT:
                return doConnect(ctx, req);
            default:
                return HttpResponse.of(HttpStatus.METHOD_NOT_ALLOWED);
        }
    }
Serves the specified {@link HttpRequest} by delegating it to the matching {@code 'doMETHOD()'} method.
core/src/main/java/com/linecorp/armeria/server/AbstractHttpService.java