Interface NettyHttpResponseBuilder

  • All Known Implementing Classes:
    NettyMutableHttpResponse

    public interface NettyHttpResponseBuilder
    Common interface for client and server to implement to construct the Netty versions of the response objects.
    Since:
    2.0.0
    • Method Detail

      • toFullHttpResponse

        @NonNull
        io.netty.handler.codec.http.FullHttpResponse toFullHttpResponse()
        Converts this object to a full http response.
        Returns:
        a full http response
      • toStreamHttpResponse

        @NonNull
        default StreamedHttpResponse toStreamHttpResponse()
        Converts this object to a streamed http response.
        Returns:
        The streamed response
      • toHttpResponse

        @NonNull
        default io.netty.handler.codec.http.HttpResponse toHttpResponse()
        Converts this object to the most appropriate http response type.
        Returns:
        The http response
      • isStream

        boolean isStream()
        Returns:
        Is the response a stream.
      • toHttpResponse

        @NonNull
        static io.netty.handler.codec.http.HttpResponse toHttpResponse​(@NonNull
                                                                       io.micronaut.http.HttpResponse<?> response)
        Convert the given response to a full http response.
        Parameters:
        response - The response
        Returns:
        The full response.
      • toStreamResponse

        @NonNull
        static StreamedHttpResponse toStreamResponse​(@NonNull
                                                     io.micronaut.http.HttpResponse<?> response)
        Convert the given response to a full http response.
        Parameters:
        response - The response
        Returns:
        The full response.