HttpURLConnection is a subclass of URLConnection that provides support for HTTP connections.

methods defined by HttpURLConnection:

static boolean getFollowRedirects( )
Returns true if redirects are automatically followed and false otherwise.
String getRequestMethod( )
Returns a string representing how URL requests are made. The default is GET. Other options, such as POST, are available.
int getResponseCode( ) throws IOException
Returns the HTTP response code. -1 is returned if no response code can be obtained.
String getResponseMessage( ) throws IOException
Returns the response message associated with the response code. Returns null if no message is available. An IOException is thrown if the connection fails.
static void setFollowRedirects(boolean how)
If how is true, then redirects are automatically followed. If how is false, redirects are not automatically followed. By default, redirects are automatically followed.
void setRequestMethod(String how) throws ProtocolException
Sets the method by which HTTP requests are made to that specified by how. The default method is GET, but other options, such as POST, are available.
  Java Book 

  1. HttpURLConnection
  2. HttpURLConnection.HTTP_OK
  3. HttpURLConnection: getContentLength()
  4. HttpURLConnection: getContentType()
  5. HttpURLConnection: getDate()
  6. HttpURLConnection: getExpiration()
  7. HttpURLConnection: getHeaderFields()
  8. HttpURLConnection: getInputStream()
  9. HttpURLConnection: getLastModified()
  10. HttpURLConnection: getRequestMethod
  11. HttpURLConnection: getResponseCode()
  12. HttpURLConnection: getResponseMessage()
  13. HttpURLConnection: setInstanceFollowRedirects(boolean followRedirects)
  14. HttpURLConnection: setRequestMethod(String method) throws ProtocolException
  15. HttpsURLConnection: getDefaultSSLSocketFactory()