Package io.ably.lib.http

Class HttpCore

java.lang.Object
io.ably.lib.http.HttpCore

public class HttpCore extends Object
HttpCore performs authenticated HTTP synchronously. Internal; use Http or HttpScheduler instead.
  • Field Details

    • scheme

      public final String scheme
    • port

      public final int port
  • Constructor Details

  • Method Details

    • httpExecuteWithRetry

      public <T> T httpExecuteWithRetry(URL url, String method, Param[] headers, HttpCore.RequestBody requestBody, HttpCore.ResponseHandler<T> responseHandler, boolean requireAblyAuth) throws AblyException
      Make a synchronous HTTP request specified by URL and proxy, retrying if necessary on WWW-Authenticate
      Parameters:
      url -
      method -
      headers -
      requestBody -
      responseHandler -
      Returns:
      Throws:
      AblyException
    • getPreferredHost

      public String getPreferredHost()
      Gets host for this HTTP client
      Returns:
    • setPreferredHost

      public void setPreferredHost(String host)
      Sets host for this HTTP client
      Parameters:
      host - URL string
    • getPrimaryHost

      public String getPrimaryHost()
      Gets host for this HTTP client
      Returns:
    • httpExecute

      public <T> T httpExecute(URL url, String method, Param[] headers, HttpCore.RequestBody requestBody, boolean withCredentials, HttpCore.ResponseHandler<T> responseHandler) throws AblyException
      Make a synchronous HTTP request specified by URL and proxy
      Parameters:
      url -
      method -
      headers -
      requestBody -
      withCredentials -
      responseHandler -
      Returns:
      Throws:
      AblyException