Package dev.restate.common
Interface RequestBuilder<Req,Res>
- All Superinterfaces:
Request<Req,
Res>
- All Known Subinterfaces:
WorkflowRequestBuilder<Req,
Res>
Options for requests to Restate services.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Append this header to the list of configured headers.Append the given header map to the list of headers.idempotencyKey
(String idempotencyKey) setHeaders
(@Nullable Map<String, String> headers) setIdempotencyKey
(@Nullable String idempotencyKey) Methods inherited from interface dev.restate.common.Request
getHeaders, getIdempotencyKey, getRequest, getRequestTypeTag, getResponseTypeTag, getTarget
-
Method Details
-
idempotencyKey
- Parameters:
idempotencyKey
- Idempotency key to attach in the request.- Returns:
- this instance, so the builder can be used fluently.
-
setIdempotencyKey
- Parameters:
idempotencyKey
- Idempotency key to attach in the request.
-
header
Append this header to the list of configured headers.- Parameters:
key
- header keyvalue
- header value- Returns:
- this instance, so the builder can be used fluently.
-
headers
Append the given header map to the list of headers.- Parameters:
newHeaders
- headers to send together with the request.- Returns:
- this instance, so the builder can be used fluently.
-
setHeaders
- Parameters:
headers
- headers to send together with the request. This will overwrite the already configured headers
-
build
- Returns:
- the built request
-