aRequestWith function

Matcher aRequestWith({
  1. Object? url,
  2. Object? method,
  3. Object? body,
  4. Object? headers,
})

Implementation

Matcher aRequestWith({
  Object? url,
  Object? method,
  Object? body,
  Object? headers,
}) {
  return allOf([
    requestMatcher(),
    if (url != null) withUrl(wrapMatcher(url)),
    if (method != null) methodWith(wrapMatcher(method)),
    if (body != null) bodyWith(wrapMatcher(body)),
    if (headers != null) headersWith(wrapMatcher(headers)),
  ]);
}