Interface Response

All Known Implementing Classes:
ResponseImpl

public interface Response
HTTP request response object.
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addCookie(jakarta.servlet.http.Cookie cookie)
    Adds a cookie to the response
    void
    setContentType(com.google.common.net.MediaType contentType)
    Sets the HTTP Content-Type and possibly encoding.
    void
    setDateHeader(String header, org.joda.time.DateTime timestamp)
    Writes an HTTP header with a timestamp value.
    void
    setHeader(String header, String value)
    Writes an HTTP header to the response.
    void
    setPayload(String payload)
    Writes the HTTP payload.
    void
    setStatus(int status)
    Sets the HTTP status code.
  • Method Details

    • setStatus

      void setStatus(int status)
      Sets the HTTP status code.
    • setContentType

      void setContentType(com.google.common.net.MediaType contentType)
      Sets the HTTP Content-Type and possibly encoding.
    • setPayload

      void setPayload(String payload)
      Writes the HTTP payload.
      Throws:
      IllegalStateException - if you've already written the payload
    • setHeader

      void setHeader(String header, String value)
      Writes an HTTP header to the response.
      See Also:
      • HttpServletResponse.setHeader(String, String)
    • setDateHeader

      void setDateHeader(String header, org.joda.time.DateTime timestamp)
      Writes an HTTP header with a timestamp value.
      See Also:
      • HttpServletResponse.setDateHeader(String, long)
    • addCookie

      void addCookie(jakarta.servlet.http.Cookie cookie)
      Adds a cookie to the response
      See Also:
      • HttpServletResponse.addCookie(Cookie)