AuthTestHttpResponse.json constructor

AuthTestHttpResponse.json(
  1. Object? value, {
  2. int statusCode = 200,
  3. Map<String, String> headers = const <String, String>{},
})

Creates a JSON response.

Implementation

factory AuthTestHttpResponse.json(
  Object? value, {
  int statusCode = 200,
  Map<String, String> headers = const <String, String>{},
}) => AuthTestHttpResponse(
  statusCode: statusCode,
  body: jsonEncode(value),
  headers: <String, String>{'content-type': 'application/json', ...headers},
);