Interface Rest.Response

Enclosing class:
Rest

public static interface Rest.Response
Response interface.
Author:
Holger Eichelberger, SSE
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the body.
    default void
    Sets the content/response type to "application/json".
    void
    Sets the body.
    void
    setStatus(int status)
    Sets the status code for the response.
    void
    Sets the content/response type.
  • Method Details

    • setBody

      void setBody(String body)
      Sets the body.
      Parameters:
      body - the body
    • getBody

      String getBody()
      Returns the body.
      Returns:
      the body
    • setStatus

      void setStatus(int status)
      Sets the status code for the response.
      Parameters:
      status - the status
    • setType

      void setType(String type)
      Sets the content/response type. Default is "text/html".
      Parameters:
      type - the type
    • setApplicationJsonType

      default void setApplicationJsonType()
      Sets the content/response type to "application/json".
      See Also: