-
public class HttpCoreHttpCore performs authenticated HTTP synchronously. Internal; use Http or HttpScheduler instead.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceHttpCore.RequestBodyInterface for an entity that supplies an httpCore request body
public interfaceHttpCore.BodyHandlerInterface for an entity that performs type-specific processing on an httpCore response body
public interfaceHttpCore.ResponseHandlerInterface for an entity that performs type-specific processing on an httpCore response
public classHttpCore.ResponseA type encapsulating an httpCore response
public classHttpCore.AuthRequiredExceptionException signifying that an httpCore request failed with a WWW-Authenticate response
-
Constructor Summary
Constructors Constructor Description HttpCore(ClientOptions options, Auth auth, PlatformAgentProvider platformAgentProvider)***********************Public API
-
Method Summary
Modifier and Type Method Description <T> ThttpExecuteWithRetry(URL url, String method, Array<Param> headers, HttpCore.RequestBody requestBody, HttpCore.ResponseHandler<T> responseHandler, boolean requireAblyAuth)Make a synchronous HTTP request specified by URL and proxy, retrying if necessary on WWW-Authenticate StringgetPreferredHost()Gets host for this HTTP client voidsetPreferredHost(String host)Sets host for this HTTP client StringgetPrimaryHost()Gets host for this HTTP client <T> ThttpExecute(URL url, String method, Array<Param> headers, HttpCore.RequestBody requestBody, boolean withCredentials, HttpCore.ResponseHandler<T> responseHandler)Make a synchronous HTTP request specified by URL and proxy HttpCoreinjectDynamicAgents(Map<String, String> wrapperSDKAgents)[Internal Method]We use this method to implement proxy Realtime / Rest clients that add additional agents to the underlying client. -
-
Constructor Detail
-
HttpCore
HttpCore(ClientOptions options, Auth auth, PlatformAgentProvider platformAgentProvider)
***********************Public API
-
-
Method Detail
-
httpExecuteWithRetry
<T> T httpExecuteWithRetry(URL url, String method, Array<Param> headers, HttpCore.RequestBody requestBody, HttpCore.ResponseHandler<T> responseHandler, boolean requireAblyAuth)
Make a synchronous HTTP request specified by URL and proxy, retrying if necessary on WWW-Authenticate
-
getPreferredHost
String getPreferredHost()
Gets host for this HTTP client
-
setPreferredHost
void setPreferredHost(String host)
Sets host for this HTTP client
- Parameters:
host- URL string
-
getPrimaryHost
String getPrimaryHost()
Gets host for this HTTP client
-
httpExecute
<T> T httpExecute(URL url, String method, Array<Param> headers, HttpCore.RequestBody requestBody, boolean withCredentials, HttpCore.ResponseHandler<T> responseHandler)
Make a synchronous HTTP request specified by URL and proxy
-
injectDynamicAgents
HttpCore injectDynamicAgents(Map<String, String> wrapperSDKAgents)
[Internal Method]
We use this method to implement proxy Realtime / Rest clients that add additional agents to the underlying client.
-
-
-
-