public class RestClient
extends java.lang.Object
| Constructor and Description |
|---|
RestClient(long duration,
java.util.concurrent.TimeUnit cacheExpireAfterAccess) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
get(java.lang.String url) |
protected java.lang.String |
getResponse(java.net.HttpURLConnection conn) |
static void |
mock(RestClient mock) |
protected java.net.HttpURLConnection |
openConnection(java.net.URL url) |
RestClient |
withBasicAuthCredentials(java.lang.String username,
java.lang.String password) |
public RestClient(long duration,
java.util.concurrent.TimeUnit cacheExpireAfterAccess)
public RestClient withBasicAuthCredentials(java.lang.String username, java.lang.String password)
public java.lang.String get(java.lang.String url)
protected java.net.HttpURLConnection openConnection(java.net.URL url)
throws java.lang.Exception
java.lang.Exceptionprotected java.lang.String getResponse(java.net.HttpURLConnection conn)
throws java.lang.Exception
java.lang.Exceptionpublic static void mock(RestClient mock)