Interface BodyWriter<T>


public interface BodyWriter<T>
Writes beans as content for a specific content type.
  • Method Summary

    Modifier and Type
    Method
    Description
    write(T bean)
    Write the bean as content using the default content type.
    write(T bean, String contentType)
    Write the bean as content with the requested content type.
  • Method Details

    • write

      BodyContent write(T 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(T 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.