public abstract class AsyncRequest extends Object
| Modifier and Type | Field and Description |
|---|---|
protected Logger |
logger |
protected String |
requestId |
| Constructor and Description |
|---|
AsyncRequest(Logger logger) |
| Modifier and Type | Method and Description |
|---|---|
abstract AsyncRequest |
header(String name,
String value)
Add a new http header to the request
|
Future<?> |
method(String method,
AsyncRequestCallback callback,
Object data,
String contentType) |
abstract Future<?> |
method(String method,
AsyncRequestCallback callback,
Object data,
String contentType,
boolean logIfError) |
public AsyncRequest(Logger logger)
public abstract AsyncRequest header(String name, String value)
name - The header namevalue - The header valueAsyncRequest object updated with the given headerpublic abstract Future<?> method(String method, AsyncRequestCallback callback, Object data, String contentType, boolean logIfError)
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.public Future<?> method(String method, AsyncRequestCallback callback, Object data, String contentType)
Copyright © 2023. All rights reserved.