{"comment":{"url":"https://api.github.com/repos/Workiva/w_transport/comments/13248869","html_url":"https://github.com/Workiva/w_transport/commit/e8e8daf47fda9bfb8152d3cded88064f16ca7c97#commitcomment-13248869","id":13248869,"user":{"login":"evanweible-wf","id":1738457,"avatar_url":"https://avatars.githubusercontent.com/u/1738457?v=3","gravatar_id":"","url":"https://api.github.com/users/evanweible-wf","html_url":"https://github.com/evanweible-wf","followers_url":"https://api.github.com/users/evanweible-wf/followers","following_url":"https://api.github.com/users/evanweible-wf/following{/other_user}","gists_url":"https://api.github.com/users/evanweible-wf/gists{/gist_id}","starred_url":"https://api.github.com/users/evanweible-wf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evanweible-wf/subscriptions","organizations_url":"https://api.github.com/users/evanweible-wf/orgs","repos_url":"https://api.github.com/users/evanweible-wf/repos","events_url":"https://api.github.com/users/evanweible-wf/events{/privacy}","received_events_url":"https://api.github.com/users/evanweible-wf/received_events","type":"User","site_admin":false},"position":19,"line":44,"path":"lib/src/mocks/http.dart","commit_id":"e8e8daf47fda9bfb8152d3cded88064f16ca7c97","created_at":"2015-09-15T22:06:58Z","updated_at":"2015-09-15T22:06:58Z","body":"Possible alternative:\r\n```dart\r\nIterable matchingExpectations = _expectations.where((e) {\r\n  bool methodMatches = e.method == request.method;\r\n  bool uriMatches = e.uri == request.uri;\r\n  bool headersMatch;\r\n  if (e.headers == null) {\r\n    // Ignore headers check if expectation didn't specify.\r\n    headersMatch = true;\r\n  } else if (e.headers.isEmpty) {\r\n    headersMatch = request.headers.isEmpty;\r\n  } else {\r\n    headersMatch = mapEquality.equals(e.headers, request.headers);\r\n  }\r\n  return methodMatches && uriMatches && headeresMatch;\r\n});\r\n```"}}