charlatanResponse function

CharlatanResponseBuilder charlatanResponse({
  1. int statusCode = 200,
  2. Object? body,
  3. Map<String, String> headers = const {},
})

A function to build a CharlatanResponseBuilder. The statusCode defaults to 200, the body defaults to null, and the headers defaults to empty.

Implementation

CharlatanResponseBuilder charlatanResponse({
  int statusCode = 200,
  Object? body,
  Map<String, String> headers = const {},
}) =>
    (request) => CharlatanHttpResponse(
          statusCode: statusCode,
          body: body,
          headers: headers,
        );