public abstract class Request extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
CONTENT_LENGTH_HEADER |
static String |
CONTENT_TYPE_HEADER |
protected Logger |
logger |
protected String |
requestId |
| Modifier and Type | Method and Description |
|---|---|
abstract Request |
header(String name,
String value)
Add a new http header to the request
|
Response |
method(String method,
Object data,
String contentType) |
protected abstract Response |
methodInner(String method,
Object data,
String contentType) |
public static String CONTENT_LENGTH_HEADER
public static String CONTENT_TYPE_HEADER
protected Logger logger
protected final String requestId
public Request(Logger logger)
public abstract Request header(String name, String value)
name - The header namevalue - The header valueRequest object updated with the given headerprotected abstract Response methodInner(String method, Object data, String contentType)
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.Copyright © 2023. All rights reserved.