Package com.applitools.connectivity.api
Class Request
- java.lang.Object
-
- com.applitools.connectivity.api.Request
-
public abstract class Request extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static StringCONTENT_LENGTH_HEADERstatic StringCONTENT_TYPE_HEADERprotected Loggerloggerprotected StringrequestId
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract Requestheader(String name, String value)Add a new http header to the requestResponsemethod(String method, Object data, String contentType)protected abstract ResponsemethodInner(String method, Object data, String contentType)
-
-
-
Constructor Detail
-
Request
public Request(Logger logger)
-
-
Method Detail
-
header
public abstract Request header(String name, String value)
Add a new http header to the request- Parameters:
name- The header namevalue- The header value- Returns:
- An
Requestobject updated with the given header
-
methodInner
protected abstract Response methodInner(String method, Object data, String contentType)
- Parameters:
method- The http method for the requestdata- 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.- Returns:
- Response from the server
-
-