Class GrpcTrailersUtil


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

      • statusToTrailers

        public static com.linecorp.armeria.common.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.