_HTTPBodyMatcher hasBody(matchSpec)

Validates that a TestResponse has the specified HTTP response body.

This matcher only validates the HTTP response body. See hasResponse for more details. Usage:

  var response = await client.request("/foo").get();
  expect(response, hasBody("string body"));

Source

_HTTPBodyMatcher hasBody(dynamic matchSpec) => new _HTTPBodyMatcher(matchSpec);