JavaScript is disabled on your browser.
play.mvc

Class Http.Response

    • Constructor Detail

      • Http.Response

        public Http.Response()
    • Method Detail

      • setHeader

        public void setHeader(java.lang.String name,
         java.lang.String Stringue)
        Adds a new header to the response.
      • getHeaders

        public java.util.Map<java.lang.String,java.lang.String> getHeaders()
        Gets the current response headers.
      • setContentType

        public void setContentType(java.lang.String contentType)
        Sets the content-type of the response.
      • setCookie

        public void setCookie(java.lang.String name,
         java.lang.String value)
        Set a new transient cookie with path "/"
        For example:
         response().setCookie("theme", "blue");
         
        Parameters:
        name - Cookie name
        value - Cookie value
      • setCookie

        public void setCookie(java.lang.String name,
         java.lang.String value,
         java.lang.Integer maxAge)
        Set a new cookie with path "/"
        Parameters:
        name - Cookie name
        value - Cookie value
        maxAge - Cookie duration (null for a transient cookie and 0 or less for a cookie that expires now)
      • setCookie

        public void setCookie(java.lang.String name,
         java.lang.String value,
         java.lang.Integer maxAge,
         java.lang.String path)
        Set a new cookie
        Parameters:
        name - Cookie name
        value - Cookie value
        maxAge - Cookie duration (null for a transient cookie and 0 or less for a cookie that expires now)
        path - Cookie path
      • setCookie

        public void setCookie(java.lang.String name,
         java.lang.String value,
         java.lang.Integer maxAge,
         java.lang.String path,
         java.lang.String domain)
        Set a new cookie
        Parameters:
        name - Cookie name
        value - Cookie value
        maxAge - Cookie duration (null for a transient cookie and 0 or less for a cookie that expires now)
        path - Cookie path
        domain - Cookie domain
      • setCookie

        public void setCookie(java.lang.String name,
         java.lang.String value,
         java.lang.Integer maxAge,
         java.lang.String path,
         java.lang.String domain,
         boolean secure,
         boolean httpOnly)
        Set a new cookie
        Parameters:
        name - Cookie name
        value - Cookie value
        maxAge - Cookie duration (null for a transient cookie and 0 or less for a cookie that expires now)
        path - Cookie path
        domain - Cookie domain
        secure - Whether the cookie is secured (for HTTPS requests)
        httpOnly - Whether the cookie is HTTP only (i.e. not accessible from client-side JavaScript code)
      • discardCookies

        @Deprecated
        public void discardCookies(java.lang.String... names)
        Deprecated. Use the discardCookie methods instead
        Discard cookies along this result
        For example:
         response().discardCookies("theme");
         
        This only discards cookies on the default path ("/") with no domain and that didn't have secure set. To discard other cookies, use the discardCookie method.
        Parameters:
        names - Names of the cookies to discard
      • discardCookie

        public void discardCookie(java.lang.String name)
        Discard a cookie on the default path ("/") with no domain and that's not secure
        Parameters:
        name - The name of the cookie to discard
      • discardCookie

        public void discardCookie(java.lang.String name,
         java.lang.String path)
        Discard a cookie on the give path with no domain and not that's secure
        Parameters:
        name - The name of the cookie to discard
        path - The path of the cookie te discard, may be null
      • discardCookie

        public void discardCookie(java.lang.String name,
         java.lang.String path,
         java.lang.String domain)
        Discard a cookie on the given path and domain that's not secure
        Parameters:
        name - The name of the cookie to discard
        path - The path of the cookie te discard, may be null
        domain - The domain of the cookie to discard, may be null
      • discardCookie

        public void discardCookie(java.lang.String name,
         java.lang.String path,
         java.lang.String domain,
         boolean secure)
        Discard a cookie in this result
        Parameters:
        name - The name of the cookie to discard
        path - The path of the cookie te discard, may be null
        domain - The domain of the cookie to discard, may be null
        secure - Whether the cookie to discard is secure
      • cookies

        public java.lang.Iterable<Http.Cookie> cookies()

AltStyle によって変換されたページ (->オリジナル) /