Interface BodyWriter


  • public interface BodyWriter
    Writes beans as content for a specific content type.
    • Method Detail

      • write

        BodyContent write​(Object bean)
        Write the bean as content using the default content type.

        Used when all beans sent via POST, PUT, PATCH will be sent as a single content type like application/json; charset=utf8.

      • write

        BodyContent write​(Object bean,
                          String contentType)
        Write the bean as content with the requested content type.

        The writer is expected to use the given contentType to determine how to write the bean as content.