public Set<String> getAllowedMethods(final HttpResponse response) {
        Args.notNull(response, "HTTP response");

        final Iterator<HeaderElement> it = MessageSupport.iterate(response, "Allow");
        final Set<String> methods = new HashSet<>();
        while (it.hasNext()) {
            final HeaderElement element = it.next();
            methods.add(element.getName());
        }
        return methods;
    }
Gets the allowed method names defined by {@code "Allow"} headers.

@param response the response to query.
@return The response to query.
httpclient5/src/main/java/org/apache/hc/client5/http/classic/methods/HttpOptions.java