when abstract method

RecordIntercept when(
  1. String method,
  2. String path, {
  3. int? port,
  4. String? host,
  5. Map<String, String> queryParameters = const {},
  6. Map<String, String> headers = const {},
})

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 {},
});