Package org.takes.rs

Class RsWithType.Text

  • All Implemented Interfaces:
    Body, Head, Response
    Enclosing class:
    RsWithType

    public static final class RsWithType.Text
    extends RsWrap
    Response decorator, with content type text/plain.

    The class is immutable and thread-safe.

    Since:
    0.30
    • Constructor Detail

      • Text

        public Text​(Response res)
        Constructs a Text that will add text/plain as the content type header to the response.
        Parameters:
        res - Original response
      • Text

        public Text​(Response res,
                    Charset charset)
        Constructs a Text that will add text/plain as the content type header to the response using the specified charset as charset parameter value.
        Parameters:
        res - Original response
        charset - The character set to add in the content type header