Interface RequestBuilder<Req,Res>

All Superinterfaces:
Request<Req,Res>
All Known Subinterfaces:
WorkflowRequestBuilder<Req,Res>

public interface RequestBuilder<Req,Res> extends Request<Req,Res>
Options for requests to Restate services.
  • Method Details

    • idempotencyKey

      RequestBuilder<Req,Res> idempotencyKey(String idempotencyKey)
      Parameters:
      idempotencyKey - Idempotency key to attach in the request.
      Returns:
      this instance, so the builder can be used fluently.
    • setIdempotencyKey

      RequestBuilder<Req,Res> setIdempotencyKey(@Nullable String idempotencyKey)
      Parameters:
      idempotencyKey - Idempotency key to attach in the request.
    • header

      RequestBuilder<Req,Res> header(String key, String value)
      Append this header to the list of configured headers.
      Parameters:
      key - header key
      value - header value
      Returns:
      this instance, so the builder can be used fluently.
    • headers

      RequestBuilder<Req,Res> headers(Map<String,String> newHeaders)
      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

      RequestBuilder<Req,Res> setHeaders(@Nullable Map<String,String> headers)
      Parameters:
      headers - headers to send together with the request. This will overwrite the already configured headers
    • build

      Request<Req,Res> build()
      Returns:
      the built request