public class SimpleHTTPClient extends Object
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_CONNECTION_TIMEOUT
Default connection timeout on HTTP requests from this client.
|
static int |
DEFAULT_READ_TIMEOUT
Default read timeout on HTTP requests from this client.
|
Constructor and Description |
---|
SimpleHTTPClient()
Generates a new SimpleHTTPClient with the appropriate timeouts.
|
SimpleHTTPClient(int readTimeout,
int connTimeout)
Generates a new SimpleHTTPClient with the appropriate timeouts.
|
Modifier and Type | Method and Description |
---|---|
String |
get(URL url)
Utility method for gathering the contents of an HTTP page.
|
public static final int DEFAULT_READ_TIMEOUT
public static final int DEFAULT_CONNECTION_TIMEOUT
public SimpleHTTPClient()
public SimpleHTTPClient(int readTimeout, int connTimeout)
readTimeout
- read timeout value (greater than or equal to zero)connTimeout
- connection timeout value (greater than or equal to zero)public String get(URL url) throws IOException
url
- from which to attempt to retrieve the contentsIOException
- If there are any problems connecting to or gathering the contents of the pageCopyright 2010-2022 ForgeRock AS.