Interface NettyHttpRequestBuilder

All Known Implementing Classes:
AbstractNettyHttpRequest, NettyClientHttpRequest, NettyHttpRequest

@Internal public interface NettyHttpRequestBuilder
Common interface for client and server to implement to construct the Netty versions of the request objects.
Since:
2.0.0
Author:
graemerocher
  • Method Details

    • toFullHttpRequest

      @Deprecated default @NonNull io.netty.handler.codec.http.FullHttpRequest toFullHttpRequest()
      Deprecated.
      Converts this object to a full http request.
      Returns:
      a full http request
    • toStreamHttpRequest

      @Deprecated(since="4.0.0", forRemoval=true) default @NonNull StreamedHttpRequest toStreamHttpRequest()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Converts this object to a streamed http request.
      Returns:
      The streamed request
    • toHttpRequest

      @Deprecated(since="4.0.0", forRemoval=true) default @NonNull io.netty.handler.codec.http.HttpRequest toHttpRequest()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Converts this object to the most appropriate http request type.
      Returns:
      The http request
    • toHttpRequestDirect

      @Deprecated default @NonNull Optional<io.netty.handler.codec.http.HttpRequest> toHttpRequestDirect()
      Deprecated.
      Directly convert this request to netty, including the body, if possible. If the body of this request has been changed, this will return an empty value.
      Returns:
      The request including the body
    • byteBodyDirect

      default @Nullable ByteBody byteBodyDirect()
      Directly convert this request body to a ByteBody, if possible. If the body of this request has been changed, this will return an empty value.
      Returns:
      The body
    • toHttpRequestWithoutBody

      @NonNull io.netty.handler.codec.http.HttpRequest toHttpRequestWithoutBody()
      Convert this request to a netty request without the body. The caller will handle adding the body.
      Returns:
      The request excluding the body
    • isStream

      @Deprecated(since="4.0.0", forRemoval=true) default boolean isStream()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns:
      Is the request a stream.
    • toHttpRequest

      @Deprecated(since="4.0.0", forRemoval=true) static @NonNull io.netty.handler.codec.http.HttpRequest toHttpRequest(@NonNull HttpRequest<?> request)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Convert the given request to a full http request.
      Parameters:
      request - The request
      Returns:
      The full request.
    • asBuilder

      static NettyHttpRequestBuilder asBuilder(@NonNull HttpRequest<?> request)
      Transform the given request to an equivalent NettyHttpRequestBuilder, so that it can be transformed to a netty request.
      Parameters:
      request - The micronaut http request
      Returns:
      The builder for further operations