Class HttpHelpers

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

public class HttpHelpers
extends java.lang.Object
  • Constructor Summary

    Constructors 
    Constructor Description
    HttpHelpers()  
  • Method Summary

    Modifier and Type Method Description
    static <T> T ablyHttpExecute​(Http http, java.lang.String path, java.lang.String method, Param[] headers, Param[] params, HttpCore.RequestBody requestBody, HttpCore.ResponseHandler<T> responseHandler, boolean requireAblyAuth)
    Make a synchronous HTTP request to an Ably endpoint, using the Ably auth credentials and fallback hosts if necessary
    static <T> T getUri​(HttpCore httpCore, java.lang.String uri, Param[] headers, Param[] params, HttpCore.ResponseHandler<T> responseHandler)
    HTTP GET for non-Ably host
    static byte[] getUrl​(HttpCore httpCore, java.lang.String url)
    Simple HTTP GET; no auth, headers, returning response body as byte[]
    static java.lang.String getUrlString​(HttpCore httpCore, java.lang.String url)
    Simple HTTP GET; no auth, headers, returning response body as string
    static <T> T httpExecute​(HttpCore httpCore, java.net.URL url, java.lang.String method, Param[] headers, HttpCore.RequestBody requestBody, HttpCore.ResponseHandler<T> responseHandler)
    Make a synchronous HTTP request to non-Ably endpoint, specified by URL and using the configured proxy, if any
    static <T> T postSync​(Http http, java.lang.String path, Param[] headers, Param[] params, HttpCore.RequestBody requestBody, HttpCore.ResponseHandler<T> responseHandler, boolean requireAblyAuth)  
    static <T> T postUri​(HttpCore httpCore, java.lang.String uri, Param[] headers, Param[] queryParams, Param[] bodyParams, HttpCore.ResponseHandler<T> responseHandler)
    HTTP POST with data in form encoding for non-Ably host

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait