HttpURLConnection
Date: 2016-06-24

java.net

## Class HttpURLConnection

- java.lang.Object
- - java.net.URLConnection
  - - java.net.HttpURLConnection

-     public abstract class HttpURLConnection
      extends URLConnection

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `HTTP_ACCEPTED`
    `static int` | `HTTP_BAD_GATEWAY`
    `static int` | `HTTP_BAD_METHOD`
    `static int` | `HTTP_BAD_REQUEST`
    `static int` | `HTTP_CLIENT_TIMEOUT`
    `static int` | `HTTP_CONFLICT`
    `static int` | `HTTP_CREATED`
    `static int` | `HTTP_ENTITY_TOO_LARGE`
    `static int` | `HTTP_FORBIDDEN`
    `static int` | `HTTP_GATEWAY_TIMEOUT`
    `static int` | `HTTP_GONE`
    `static int` | `HTTP_INTERNAL_ERROR`
    `static int` | `HTTP_LENGTH_REQUIRED`
    `static int` | `HTTP_MOVED_PERM`
    `static int` | `HTTP_MOVED_TEMP`
    `static int` | `HTTP_MULT_CHOICE`
    `static int` | `HTTP_NO_CONTENT`
    `static int` | `HTTP_NOT_ACCEPTABLE`
    `static int` | `HTTP_NOT_AUTHORITATIVE`
    `static int` | `HTTP_NOT_FOUND`
    `static int` | `HTTP_NOT_IMPLEMENTED`
    `static int` | `HTTP_NOT_MODIFIED`
    `static int` | `HTTP_OK`
    `static int` | `HTTP_PARTIAL`
    `static int` | `HTTP_PAYMENT_REQUIRED`
    `static int` | `HTTP_PRECON_FAILED`
    `static int` | `HTTP_PROXY_AUTH`
    `static int` | `HTTP_REQ_TOO_LONG`
    `static int` | `HTTP_RESET`
    `static int` | `HTTP_SEE_OTHER`
    `static int` | `HTTP_UNAUTHORIZED`
    `static int` | `HTTP_UNAVAILABLE`
    `static int` | `HTTP_UNSUPPORTED_TYPE`
    `static int` | `HTTP_USE_PROXY`
    `static int` | `HTTP_VERSION`
    `protected boolean` | `instanceFollowRedirects`
    `protected String` | `method`
    `protected int` | `responseCode`
    `protected String` | `responseMessage`

    - ### Fields inherited from class java.net.URLConnection

      `allowUserInteraction, connected, doInput, doOutput, ifModifiedSince, url, useCaches`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `HttpURLConnection(URL var0)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract void` | `disconnect()`
    `InputStream` | `getErrorStream()`
    `static boolean` | `getFollowRedirects()`
    `boolean` | `getInstanceFollowRedirects()`
    `String` | `getRequestMethod()`
    `int` | `getResponseCode()`
    `String` | `getResponseMessage()`
    `static void` | `setFollowRedirects(boolean var0)`
    `void` | `setInstanceFollowRedirects(boolean var0)`
    `void` | `setRequestMethod(String var0)`
    `abstract boolean` | `usingProxy()`

    - ### Methods inherited from class java.net.URLConnection

      `addRequestProperty, connect, getAllowUserInteraction, getContent, getContent, getContentEncoding, getContentLength, getContentType, getDate, getDefaultAllowUserInteraction, getDefaultUseCaches, getDoInput, getDoOutput, getExpiration, getFileNameMap, getHeaderField, getHeaderField, getHeaderFieldDate, getHeaderFieldInt, getHeaderFieldKey, getHeaderFields, getIfModifiedSince, getInputStream, getLastModified, getOutputStream, getPermission, getRequestProperties, getRequestProperty, getURL, getUseCaches, guessContentTypeFromName, guessContentTypeFromStream, setAllowUserInteraction, setContentHandlerFactory, setDefaultAllowUserInteraction, setDefaultUseCaches, setDoInput, setDoOutput, setFileNameMap, setIfModifiedSince, setRequestProperty, setUseCaches`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### HTTP_ACCEPTED

          public static final int HTTP_ACCEPTED

      See Also:
        Constant Field Values

    - #### HTTP_BAD_GATEWAY

          public static final int HTTP_BAD_GATEWAY

      See Also:
        Constant Field Values

    - #### HTTP_BAD_METHOD

          public static final int HTTP_BAD_METHOD

      See Also:
        Constant Field Values

    - #### HTTP_BAD_REQUEST

          public static final int HTTP_BAD_REQUEST

      See Also:
        Constant Field Values

    - #### HTTP_CLIENT_TIMEOUT

          public static final int HTTP_CLIENT_TIMEOUT

      See Also:
        Constant Field Values

    - #### HTTP_CONFLICT

          public static final int HTTP_CONFLICT

      See Also:
        Constant Field Values

    - #### HTTP_CREATED

          public static final int HTTP_CREATED

      See Also:
        Constant Field Values

    - #### HTTP_ENTITY_TOO_LARGE

          public static final int HTTP_ENTITY_TOO_LARGE

      See Also:
        Constant Field Values

    - #### HTTP_FORBIDDEN

          public static final int HTTP_FORBIDDEN

      See Also:
        Constant Field Values

    - #### HTTP_GATEWAY_TIMEOUT

          public static final int HTTP_GATEWAY_TIMEOUT

      See Also:
        Constant Field Values

    - #### HTTP_GONE

          public static final int HTTP_GONE

      See Also:
        Constant Field Values

    - #### HTTP_INTERNAL_ERROR

          public static final int HTTP_INTERNAL_ERROR

      See Also:
        Constant Field Values

    - #### HTTP_LENGTH_REQUIRED

          public static final int HTTP_LENGTH_REQUIRED

      See Also:
        Constant Field Values

    - #### HTTP_MOVED_PERM

          public static final int HTTP_MOVED_PERM

      See Also:
        Constant Field Values

    - #### HTTP_MOVED_TEMP

          public static final int HTTP_MOVED_TEMP

      See Also:
        Constant Field Values

    - #### HTTP_MULT_CHOICE

          public static final int HTTP_MULT_CHOICE

      See Also:
        Constant Field Values

    - #### HTTP_NOT_ACCEPTABLE

          public static final int HTTP_NOT_ACCEPTABLE

      See Also:
        Constant Field Values

    - #### HTTP_NOT_AUTHORITATIVE

          public static final int HTTP_NOT_AUTHORITATIVE

      See Also:
        Constant Field Values

    - #### HTTP_NOT_FOUND

          public static final int HTTP_NOT_FOUND

      See Also:
        Constant Field Values

    - #### HTTP_NOT_IMPLEMENTED

          public static final int HTTP_NOT_IMPLEMENTED

      See Also:
        Constant Field Values

    - #### HTTP_NOT_MODIFIED

          public static final int HTTP_NOT_MODIFIED

      See Also:
        Constant Field Values

    - #### HTTP_NO_CONTENT

          public static final int HTTP_NO_CONTENT

      See Also:
        Constant Field Values

    - #### HTTP_OK

          public static final int HTTP_OK

      See Also:
        Constant Field Values

    - #### HTTP_PARTIAL

          public static final int HTTP_PARTIAL

      See Also:
        Constant Field Values

    - #### HTTP_PAYMENT_REQUIRED

          public static final int HTTP_PAYMENT_REQUIRED

      See Also:
        Constant Field Values

    - #### HTTP_PRECON_FAILED

          public static final int HTTP_PRECON_FAILED

      See Also:
        Constant Field Values

    - #### HTTP_PROXY_AUTH

          public static final int HTTP_PROXY_AUTH

      See Also:
        Constant Field Values

    - #### HTTP_REQ_TOO_LONG

          public static final int HTTP_REQ_TOO_LONG

      See Also:
        Constant Field Values

    - #### HTTP_RESET

          public static final int HTTP_RESET

      See Also:
        Constant Field Values

    - #### HTTP_SEE_OTHER

          public static final int HTTP_SEE_OTHER

      See Also:
        Constant Field Values

    - #### HTTP_UNAUTHORIZED

          public static final int HTTP_UNAUTHORIZED

      See Also:
        Constant Field Values

    - #### HTTP_UNAVAILABLE

          public static final int HTTP_UNAVAILABLE

      See Also:
        Constant Field Values

    - #### HTTP_UNSUPPORTED_TYPE

          public static final int HTTP_UNSUPPORTED_TYPE

      See Also:
        Constant Field Values

    - #### HTTP_USE_PROXY

          public static final int HTTP_USE_PROXY

      See Also:
        Constant Field Values

    - #### HTTP_VERSION

          public static final int HTTP_VERSION

      See Also:
        Constant Field Values

    - #### instanceFollowRedirects

          protected boolean instanceFollowRedirects

    - #### method

          protected String method

    - #### responseCode

          protected int responseCode

    - #### responseMessage

          protected String responseMessage

  - ### Constructor Detail

    - #### HttpURLConnection

          protected HttpURLConnection(URL var0)

  - ### Method Detail

    - #### disconnect

          public abstract void disconnect()

    - #### getErrorStream

          public InputStream getErrorStream()

    - #### getFollowRedirects

          public static boolean getFollowRedirects()

    - #### getInstanceFollowRedirects

          public boolean getInstanceFollowRedirects()

    - #### getRequestMethod

          public String getRequestMethod()

    - #### getResponseCode

          public int getResponseCode()
                              throws IOException

      Throws:
        `IOException`

    - #### getResponseMessage

          public String getResponseMessage()
                                    throws IOException

      Throws:
        `IOException`

    - #### setFollowRedirects

          public static void setFollowRedirects(boolean var0)

    - #### setInstanceFollowRedirects

          public void setInstanceFollowRedirects(boolean var0)

    - #### setRequestMethod

          public void setRequestMethod(String var0)
                                throws ProtocolException

      Throws:
        `ProtocolException`

    - #### usingProxy

          public abstract boolean usingProxy()