@Nullable
    public static HttpMethod tryParse(@Nullable String method) {
        if (method == null) {
            return null;
        }

        switch (method) {
            case "OPTIONS":
                return OPTIONS;
            case "GET":
                return GET;
            case "HEAD":
                return HEAD;
            case "POST":
                return POST;
            case "PUT":
                return PUT;
            case "PATCH":
                return PATCH;
            case "DELETE":
                return DELETE;
            case "TRACE":
                return TRACE;
            case "CONNECT":
                return CONNECT;
            default:
                return null;
        }
    }
Parses the specified {@link String} into an {@link HttpMethod}. This method will return the same
{@link HttpMethod} instance for equal values of {@code method}. Note that this method will not
treat {@code "UNKNOWN"} as a valid value and thus will return {@code null} when {@code "UNKNOWN"}
is given.

@return {@code null} if there is no such {@link HttpMethod} available
core/src/main/java/com/linecorp/armeria/common/HttpMethod.java