Package org.forgerock.util
Class SimpleHTTPClient
- java.lang.Object
-
- org.forgerock.util.SimpleHTTPClient
-
@Deprecated public class SimpleHTTPClient extends Object
Deprecated.Since COMMONS-390. It is recommended to use a CHF Client.Simple helper client for connecting to URLs over HTTP and retrieving their contents via a GET request. Settable timeouts on read and connection.
-
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_CONNECTION_TIMEOUT
Deprecated.Default connection timeout on HTTP requests from this client.static int
DEFAULT_READ_TIMEOUT
Deprecated.Default read timeout on HTTP requests from this client.
-
Constructor Summary
Constructors Constructor Description SimpleHTTPClient()
Deprecated.Since COMMONS-390.SimpleHTTPClient(int readTimeout, int connTimeout)
Deprecated.Since COMMONS-390.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description String
get(URL url)
Deprecated.Utility method for gathering the contents of an HTTP page.
-
-
-
Field Detail
-
DEFAULT_READ_TIMEOUT
public static final int DEFAULT_READ_TIMEOUT
Deprecated.Default read timeout on HTTP requests from this client.- See Also:
- Constant Field Values
-
DEFAULT_CONNECTION_TIMEOUT
public static final int DEFAULT_CONNECTION_TIMEOUT
Deprecated.Default connection timeout on HTTP requests from this client.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SimpleHTTPClient
@Deprecated public SimpleHTTPClient()
Deprecated.Since COMMONS-390. It is recommended to use a CHF Client.Generates a new SimpleHTTPClient with the appropriate timeouts.
-
SimpleHTTPClient
@Deprecated public SimpleHTTPClient(int readTimeout, int connTimeout)
Deprecated.Since COMMONS-390. It is recommended to use a CHF Client.Generates a new SimpleHTTPClient with the appropriate timeouts.- Parameters:
readTimeout
- read timeout value (greater than or equal to zero)connTimeout
- connection timeout value (greater than or equal to zero)
-
-
Method Detail
-
get
public String get(URL url) throws IOException
Deprecated.Utility method for gathering the contents of an HTTP page. Should ideally be in an HTTP Client utils type package, rather than here.- Parameters:
url
- from which to attempt to retrieve the contents- Returns:
- The contents of the provided url
- Throws:
IOException
- If there are any problems connecting to or gathering the contents of the page
-
-