public class OkHttpClient extends java.lang.Object implements HttpClient
| Constructor and Description |
|---|
OkHttpClient()
Initializes the OhHttp# httpClient.
|
OkHttpClient(okhttp3.OkHttpClient httpClient)
Initializes the OhHttp# httpClient.
|
OkHttpClient(java.util.concurrent.TimeUnit timeUnit,
long timeout)
Initializes the OhHttp# httpClient.
|
| Modifier and Type | Method and Description |
|---|---|
<any> |
get(java.lang.String url)
Performs a GET request with the given url using the httpClient from
okhttp3.
|
public OkHttpClient()
Note: Default timeout is 1 second
public OkHttpClient(java.util.concurrent.TimeUnit timeUnit,
long timeout)
timeUnit - Specify the unit of the timeout value.timeout - Specify a request timeout for the httpClient.public OkHttpClient(okhttp3.OkHttpClient httpClient)
httpClient - An instance of okhttp3.OkHttpClient for Ascend to use.public <any> get(java.lang.String url)
get in interface HttpClienturl - a valid url representing a call to the Participant API.