public interface Response
This interface represents the response of the current user interaction.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addCookie(Cookie cookie)
    Add the specified cookie.
    void
    Set the body.
    void
    setHeader(String name, String value)
    Set the value of the header with the specified name with the specified value.
    void
    setHeaders(String name, List<String> values)
    Set the value list of the header with the specified name with the specified value list.
    void
    setStatus(int status)
    Set the status.
  • Method Details

    • setStatus

      void setStatus(int status)
      Set the status. Example of statuses are 200, 400, and 500.
      Parameters:
      status - The status.
    • setHeader

      void setHeader(String name, String value)
      Set the value of the header with the specified name with the specified value.
      Parameters:
      name - The name.
      value - The value.
    • setHeaders

      void setHeaders(String name, List<String> values)
      Set the value list of the header with the specified name with the specified value list.
      Parameters:
      name - The name.
      values - The value list.
    • addCookie

      void addCookie(Cookie cookie)
      Add the specified cookie.
      Parameters:
      cookie - The cookie.
    • setBody

      void setBody(InputStream body)
      Set the body.
      Parameters:
      body - The body.