-
public class HttpHelpers
-
-
Method Summary
Modifier and Type Method Description static <T> TablyHttpExecute(Http http, String path, String method, Array<Param> headers, Array<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 StringgetUrlString(HttpCore httpCore, String url)Simple HTTP GET; no auth, headers, returning response body as string static Array<byte>getUrl(HttpCore httpCore, String url)Simple HTTP GET; no auth, headers, returning response body as byte[] static <T> TgetUri(HttpCore httpCore, String uri, Array<Param> headers, Array<Param> params, HttpCore.ResponseHandler<T> responseHandler)HTTP GET for non-Ably host static <T> TpostUri(HttpCore httpCore, String uri, Array<Param> headers, Array<Param> queryParams, Array<Param> bodyParams, HttpCore.ResponseHandler<T> responseHandler)HTTP POST with data in form encoding for non-Ably host static <T> ThttpExecute(HttpCore httpCore, URL url, String method, Array<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> TpostSync(Http http, String path, Array<Param> headers, Array<Param> params, HttpCore.RequestBody requestBody, HttpCore.ResponseHandler<T> responseHandler, boolean requireAblyAuth)-
-
Method Detail
-
ablyHttpExecute
static <T> T ablyHttpExecute(Http http, String path, String method, Array<Param> headers, Array<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
-
getUrlString
static String getUrlString(HttpCore httpCore, String url)
Simple HTTP GET; no auth, headers, returning response body as string
-
getUrl
static Array<byte> getUrl(HttpCore httpCore, String url)
Simple HTTP GET; no auth, headers, returning response body as byte[]
-
getUri
static <T> T getUri(HttpCore httpCore, String uri, Array<Param> headers, Array<Param> params, HttpCore.ResponseHandler<T> responseHandler)
HTTP GET for non-Ably host
-
postUri
static <T> T postUri(HttpCore httpCore, String uri, Array<Param> headers, Array<Param> queryParams, Array<Param> bodyParams, HttpCore.ResponseHandler<T> responseHandler)
HTTP POST with data in form encoding for non-Ably host
-
httpExecute
static <T> T httpExecute(HttpCore httpCore, URL url, String method, Array<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
-
-
-
-