exact method
void
exact({})
Implementation
void exact(
{int? statusCode,
String? body,
List<int>? bytes,
String? mimeType,
String? encoding,
Map<String, String>? headers,
int? contentLength}) {
final conditions = <Checker<http.Response>>[];
if (statusCode != null) {
conditions.add(statusCodeIs(statusCode));
}
if (body != null) {
conditions.add(bodyIs(body));
}
if (bytes != null) {
conditions.add(bodyBytesIs(bytes));
}
if (mimeType != null) {
conditions.add(mimeTypeIs(mimeType));
}
if (encoding != null) {
conditions.add(encodingIs(encoding));
}
if (headers != null) {
headers.forEach(
(String key, String value) => conditions.add(headersHas(key, value)));
}
return expect(conditions);
}