when abstract method
Set-up an intercept to an HTTP request.
Any requests that match the given method, path, and given
optional values will complete with the values given by
RecordIntercept.respondWith.
Implementation
RecordIntercept when(
String method,
String path, {
int? port,
String? host,
Map<String, String> queryParameters = const {},
Map<String, String> headers = const {},
});