Class WebRequestSettings

java.lang.Object
io.fluxzero.sdk.web.WebRequestSettings

public class WebRequestSettings extends Object
Configuration settings for a WebRequest sent via the WebRequestGateway.

By default, requests are published as Fluxzero messages and forwarded by the Fluxzero proxy. Applications can opt into execution by the SDK's native HTTP client instead. Retries after transport failures or configured HTTP response statuses apply within the configured overall timeout.

Example usage:

WebRequestSettings settings = WebRequestSettings.builder()
    .httpVersion(HttpVersion.HTTP_2)
    .timeout(Duration.ofSeconds(30))
    .consumer("google-traffic")
    .maxRetries(2)
    .retryDelay(Duration.ofMillis(250))
    .retryableStatusCodes(Set.of(502, 503, 504))
    .build();
See Also:
  • Constructor Details

    • WebRequestSettings

      public WebRequestSettings()
  • Method Details

    • retriesFor

      public int retriesFor(String method, Map<String, List<String>> headers)
      Returns the configured retry count after applying this request's safety policy.
    • nextRetryDelay

      public Duration nextRetryDelay()
      Selects the next nonnegative retry delay; callers must still check their remaining timeout budget.