Package org.takes.rs

Class RsWithType.Html

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

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

    The class is immutable and thread-safe.

    Since:
    0.30
    • Constructor Detail

      • Html

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

        public Html​(Response res,
                    Charset charset)
        Constructs a HTML that will add text/html 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