I need to create a simple HTTP client program with Java.
I've not found any example of implementation in Java that allows calling the OPTIONS method to get the Allow header with the allowed methods on the server.
I tried using:
HttpURLConnection http = (HttpURLConnection) url.openConnection();
System.out.println(http.getHeaderFields());
But the field Allow: GET, POST ...
is not included.