public class RestClientUtil extends Object
| Constructor and Description |
|---|
RestClientUtil(int connectionTimeout,
int socketTimeout)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
String |
executeGet(String urlStr,
String defaultValue)
Executes a HTTP GET to the given url
|
boolean |
executePost(String urlStr)
Executes a HTTP POST to the given url
|
public RestClientUtil(int connectionTimeout,
int socketTimeout)
connectionTimeout - connectionTimeout in millisecondssocketTimeout - socketTimeout in millisecondspublic boolean executePost(String urlStr) throws IOException
urlStr - URL to invokeIOException - there's a communication errorpublic String executeGet(String urlStr, String defaultValue) throws IOException
urlStr - URL to invokedefaultValue - default value to return if the http response is not HTTP_OKIOException - there's a communication errorCopyright © 2016–2019. All rights reserved.