forStatusCodeMatching method

HttpWaitStrategy forStatusCodeMatching(
  1. bool matcher(
    1. int
    )
)

Replaces the status-code check with a custom matcher function.

When set, matcher takes precedence over any codes added via forStatusCode.

Returns this for chaining.

Implementation

HttpWaitStrategy forStatusCodeMatching(bool Function(int) matcher) {
  _statusCodeMatcher = matcher;
  return this;
}