Package io.micronaut.http.netty
Interface NettyHttpResponseBuilder
-
- All Known Implementing Classes:
NettyMutableHttpResponse
public interface NettyHttpResponseBuilderCommon interface for client and server to implement to construct the Netty versions of the response objects.- Since:
- 2.0.0
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description booleanisStream()io.netty.handler.codec.http.FullHttpResponsetoFullHttpResponse()Converts this object to a full http response.default io.netty.handler.codec.http.HttpResponsetoHttpResponse()Converts this object to the most appropriate http response type.static io.netty.handler.codec.http.HttpResponsetoHttpResponse(io.micronaut.http.HttpResponse<?> response)Convert the given response to a full http response.default StreamedHttpResponsetoStreamHttpResponse()Converts this object to a streamed http response.static StreamedHttpResponsetoStreamResponse(io.micronaut.http.HttpResponse<?> response)Convert the given response to a full http response.
-
-
-
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.
-
-