Package org.takes.rs

Class RsWithType.Xml

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

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

    The class is immutable and thread-safe.

    Since:
    0.30
    • Constructor Detail

      • Xml

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

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