public static HttpUriRequest create(final Method method, final URI uri) {
        switch (Args.notNull(method, "method")) {
        case DELETE:
            return delete(uri);
        case GET:
            return get(uri);
        case HEAD:
            return head(uri);
        case OPTIONS:
            return options(uri);
        case PATCH:
            return patch(uri);
        case POST:
            return post(uri);
        case PUT:
            return put(uri);
        case TRACE:
            return trace(uri);
        default:
            throw new IllegalArgumentException(method.toString());
        }
    }
Creates a new HttpUriRequest for the given {@code Method} and {@code URI}.

@param method A method.
@param uri a URI.
@return a new HttpUriRequest.
httpclient5/src/main/java/org/apache/hc/client5/http/classic/methods/ClassicHttpRequests.java