# Class URL.HttpURLConnection

java.lang.Object
com.codename1.io.URL.URLConnection
com.codename1.io.URL.HttpURLConnection

Enclosing class:
  `URL`

public class URL.HttpURLConnection extends URL.URLConnection

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `connect()`
  `int`
  `getContentLength()`
  `String`
  `getContentType()`
  `String`
  `getHeaderField(String s)`
  `Map<String, List<String>>`
  `getHeaderFields()`
  `InputStream`
  `getInputStream()`
  `OutputStream`
  `getOutputStream()`
  `void`
  `setRequestMethod(String method)`

  ### Methods inherited from class URL.URLConnection

  `getConnectTimeout, getContentLengthLong, getDoInput, getDoOutput, getReadTimeout, getURL, setConnectTimeout, setDoInput, setDoOutput, setReadTimeout, setRequestProperty`

  ### Methods inherited from class Object

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

- ## Method Details

  - ### connect

    public void connect() throws IOException
    Specified by:
      `connect` in class `URL.URLConnection`
    Throws:
      `IOException`

  - ### setRequestMethod

    public void setRequestMethod(String method)

  - ### getContentLength

    public int getContentLength()
    Specified by:
      `getContentLength` in class `URL.URLConnection`

  - ### getContentType

    public String getContentType()
    Specified by:
      `getContentType` in class `URL.URLConnection`

  - ### getHeaderField

    public String getHeaderField(String s)
    Specified by:
      `getHeaderField` in class `URL.URLConnection`

  - ### getHeaderFields

    public Map<String, List<String>> getHeaderFields()
    Specified by:
      `getHeaderFields` in class `URL.URLConnection`

  - ### getInputStream

    public InputStream getInputStream() throws IOException
    Specified by:
      `getInputStream` in class `URL.URLConnection`
    Throws:
      `IOException`

  - ### getOutputStream

    public OutputStream getOutputStream() throws IOException
    Specified by:
      `getOutputStream` in class `URL.URLConnection`
    Throws:
      `IOException`