@UnstableApi
    default RoutingContext withMethod(HttpMethod method) {
        requireNonNull(method, "method");
        if (method == method()) {
            return this;
        }
        return new RoutingContextWrapper(this) {
            @Override
            public HttpMethod method() {
                return method;
            }
        };
    }
Returns a wrapped {@link RoutingContext} which holds the specified {@link HttpMethod}.
core/src/main/java/com/linecorp/armeria/server/RoutingContext.java