Package com.applitools.connectivity.api
Class AsyncRequest
- java.lang.Object
-
- com.applitools.connectivity.api.AsyncRequest
-
public abstract class AsyncRequest extends Object
Wrapper for the asynchronous request api of the connectivity packages
-
-
Constructor Summary
Constructors Constructor Description AsyncRequest(Logger logger)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract AsyncRequestheader(String name, String value)Add a new http header to the requestFuture<?>method(String method, AsyncRequestCallback callback, Object data, String contentType)abstract Future<?>method(String method, AsyncRequestCallback callback, Object data, String contentType, boolean logIfError)
-
-
-
Constructor Detail
-
AsyncRequest
public AsyncRequest(Logger logger)
-
-
Method Detail
-
header
public abstract AsyncRequest header(String name, String value)
Add a new http header to the request- Parameters:
name- The header namevalue- The header value- Returns:
- An
AsyncRequestobject updated with the given header
-
method
public abstract Future<?> method(String method, AsyncRequestCallback callback, Object data, String contentType, boolean logIfError)
- Parameters:
method- The http method for the requestcallback- To be called when the response is receiveddata- The data to send with the request. If null, no data will be sent.contentType- The data content type. If null, no data will be sent.logIfError- If true, a detailed log will be written in case of an error.- Returns:
- Response from the server
-
method
public Future<?> method(String method, AsyncRequestCallback callback, Object data, String contentType)
-
-