Java 1.0 only supports GET and POST requests to HTTP servers
Java 1.1/1.2 supports GET, POST, HEAD, OPTIONS, PUT, DELETE, and TRACE.
The protocol is chosen with the setRequestMethod(String method) method.
A java.net.ProtocolException, a subclass of IOException, is thrown if an unknown
protocol is specified.
The getRequestMethod()
method returns the string form of the request method currently set for the
URLConnection. GET is the default method.