import static com.google.common.base.Preconditions.checkNotNull;
An immutable request to a HTTP server.
Correlation ID Header name
private final byte body;
serviceId Logical name of the request service. Used by
to resolve the real URL.
If null, only
url is used
method HTTP method verb
url Service request URL. Can be an absolute URL or just an path getting combined with the URL of the logical
headers HTTP headers
body HTTP Payload
charset Payload charset
Method to invoke on the server.
Fully resolved url including query.
Ordered list of headers that will be sent to the server.
Collects all "Cache-Control" directives from the response headers into a single map. The keys in the map are the
directive names (e.g. "max-age", "no-cache"), and everything after the "=" is taken as value. For directives that
don't have a value "true" is used as a value instead.
- the map of Cache-Control directives
name of the query parameter
- true if the parameter exists in this request's query
The character set with which the body is encoded, or null if unknown or not applicable. When this is present, you
new String(req.body(), req.charset())
to access the body as a String.
If present, this is the replayable body to send to the server. In some cases, this may be interpretable as text.
- the value of the correlation-id header or null if it wasn't set