Class HttpResponseModifierCondition


public class HttpResponseModifierCondition extends ObjectWithJsonToString
A minimal, self-contained predicate that gates whether a HttpResponseModifier applies.

The condition is evaluated against the in-flight (upstream) response and, optionally, the original request. It is intentionally small — it reuses the well-known status-code-range string forms rather than inventing a new condition language:

  • statusCode — exact equality against the response status code.
  • statusCodeRange — an HTTP status class such as "2xx" / "5XX" (case-insensitive), matched when the status falls in [N00, N99].
  • responseHasHeader — the response carries a header with this name (case-insensitive), any value.
  • requestHasHeader — the request carries a header with this name (case-insensitive), any value. Ignored when no request is available at the application site.

All configured criteria must hold (logical AND). A condition with no criteria configured matches everything. An unparseable statusCodeRange is a clean non-match (never throws).

Author:
jamesdbloom