Class GrpcTrailersUtil

java.lang.Object
com.linecorp.armeria.common.grpc.protocol.GrpcTrailersUtil

@UnstableApi
public final class GrpcTrailersUtil
extends Object
Utility for creating response trailers for a gRPC status. Trailers are only returned from a server.
  • Method Details

    • statusToTrailers

      public static HttpHeadersBuilder statusToTrailers​(int code, @Nullable String message, boolean headersSent)
      Converts the given gRPC status code, and optionally an error message, to headers. The headers will be either trailers-only or normal trailers based on headersSent, whether leading headers have already been sent to the client.