public class HttpClientBuilder extends Object
| Constructor and Description |
|---|
HttpClientBuilder(MonitorServiceConfiguration.StorageAdapterConfiguration storageAdapter,
SSLContext sslContext)
Creates the object that can be used to build HTTP clients.
|
| Modifier and Type | Method and Description |
|---|---|
com.squareup.okhttp.Request |
buildJsonDeleteRequest(String url,
Map<String,String> headers) |
com.squareup.okhttp.Request |
buildJsonGetRequest(String url,
Map<String,String> headers) |
com.squareup.okhttp.Request |
buildJsonPostRequest(String url,
Map<String,String> headers,
String jsonPayload) |
com.squareup.okhttp.Request |
buildJsonPutRequest(String url,
Map<String,String> headers,
String jsonPayload) |
com.squareup.okhttp.ws.WebSocketCall |
createWebSocketCall(String url,
Map<String,String> headers) |
com.squareup.okhttp.OkHttpClient |
getHttpClient()
Returns the last built HTTP client.
|
public HttpClientBuilder(MonitorServiceConfiguration.StorageAdapterConfiguration storageAdapter, SSLContext sslContext)
configuration - configuration settings to determine things about the HTTP connections
any built clients will be asked to makesslContext - if not null, and if the configuration tells use to use SSL, this will
be the SSL context to use.public com.squareup.okhttp.OkHttpClient getHttpClient()
throws Exception
Exceptionpublic com.squareup.okhttp.Request buildJsonGetRequest(String url, Map<String,String> headers)
public com.squareup.okhttp.Request buildJsonDeleteRequest(String url, Map<String,String> headers)
public com.squareup.okhttp.Request buildJsonPostRequest(String url, Map<String,String> headers, String jsonPayload)
public com.squareup.okhttp.Request buildJsonPutRequest(String url, Map<String,String> headers, String jsonPayload)
Copyright © 2015–2016 Red Hat, Inc.. All rights reserved.