ResponseEntity constructor

ResponseEntity(
  1. int statusCode, {
  2. Object? body,
  3. ObjectMapper? objectMapper,
  4. Map<String, Object>? headers,
  5. Encoding? encoding,
  6. Map<String, Object>? context,
})

Implementation

ResponseEntity(
  super.statusCode, {
  Object? body,
  ObjectMapper? objectMapper,
  super.headers,
  super.encoding,
  super.context,
})  : _body = body,
      super(
        body: body is! Stream
            ? body != null
                ? (objectMapper ?? Winter.instance.context.objectMapper)
                    .serialize(body)
                : ''
            : body,
      );