Package com.jalios.io

Class HttpClient

java.lang.Object
com.jalios.io.HttpClient

public class HttpClient extends Object
  • Field Details

  • Constructor Details

    • HttpClient

      public HttpClient()
  • Method Details

    • connect

      public boolean connect(String url)
      Initialize a Connection to a given URL
      Parameters:
      url - the URL to connect
      Returns:
      true if the connection is OK
    • getContents

      public String getContents(String url)
      Connect, get the content and disconnect.
      Parameters:
      url - the URL to request for the content
      Returns:
      the content
    • readCookie

      public String readCookie() throws IOException
      Return the value of the cookie
      Returns:
      the cookie
      Throws:
      IOException - Exception thrown on cookie reading