Interface HttpResponseFactory

    • Method Detail

      • ok

        <T> MutableHttpResponse<T> ok​(T body)
        Creates an HttpStatus.OK response with a body.
        Type Parameters:
        T - The body type
        Parameters:
        body - The body
        Returns:
        The ok response with the given body
      • status

        <T> MutableHttpResponse<T> status​(HttpStatus status,
                                          java.lang.String reason)
        Return a response for the given status.
        Type Parameters:
        T - The response type
        Parameters:
        status - The status
        reason - An alternatively reason message
        Returns:
        The response
      • status

        <T> MutableHttpResponse<T> status​(HttpStatus status,
                                          T body)
        Return a response for the given status.
        Type Parameters:
        T - The body type
        Parameters:
        status - The status
        body - The body
        Returns:
        The response
      • ok

        default <T> MutableHttpResponse<T> ok()
        Type Parameters:
        T - The response type
        Returns:
        The ok response
      • status

        default <T> MutableHttpResponse<T> status​(HttpStatus status)
        Type Parameters:
        T - The response type
        Parameters:
        status - The status
        Returns:
        The restus response