private static HttpRequest.Method getMethod(Request jettyRequest) {
        String method = jettyRequest.getMethod();
        try {
            return HttpRequest.Method.valueOf(method);
        } catch (IllegalArgumentException e) {
            throw new RequestException(METHOD_NOT_ALLOWED, "Invalid method '" + method + "'");
        }
    }
@author Simon Thoresen Hult
@author bjorncs
container-core/src/main/java/com/yahoo/jdisc/http/server/jetty/HttpRequestFactory.java