private[this] def body()

in http-core/src/main/scala/com/twitter/finatra/http/response/EnrichedResponse.scala [769:789]


  private[this] def body(request: Option[Request], any: Any): EnrichedResponse = {
    if (any == null) {
      nothing
    } else {
      val writer = messageBodyManager.writer(any)
      val writerResponse: WriterResponse = request match {
        case Some(req) => writer.write(req, any)
        case None => writer.write(any)
      }
      writerResponse match {
        case WriterResponse.EmptyResponse =>
          nothing
        case _ =>
          bodyContentType(writerResponse.contentType)
          headers(writerResponse.headers)
          body(writerResponse)
      }
    }

    this
  }