Package com.applitools.connectivity.api
Class AsyncRequest
java.lang.Object
com.applitools.connectivity.api.AsyncRequest
Wrapper for the asynchronous request api of the connectivity packages
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract AsyncRequestAdd 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)
-
Field Details
-
logger
-
requestId
-
-
Constructor Details
-
AsyncRequest
-
-
Method Details
-
header
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)
-