Class UnaryGrpcClient

java.lang.Object
com.linecorp.armeria.client.grpc.protocol.UnaryGrpcClient

@UnstableApi
public final class UnaryGrpcClient
extends Object
A UnaryGrpcClient can be used to make requests to a gRPC server without depending on gRPC stubs. This client takes care of deframing and framing with the gRPC wire format and handling appropriate headers.

This client does not support compression. If you need support for compression, please consider using normal gRPC stubs or file a feature request.

  • Constructor Details

  • Method Details

    • execute

      public CompletableFuture<byte[]> execute​(String uri, byte[] payload)
      Executes a unary gRPC client request. The given payload will be framed and sent to the path at uri. uri should be the method's URI, which is always of the format /:package-name.:service-name/:method. For example, for the proto package armeria.protocol, the service name CoolService and the method name RunWithoutStubs, the uri would be /armeria.protocol.CoolService/RunWithoutStubs. If you aren't sure what the package, service name, and method name are for your method, you should probably use normal gRPC stubs instead of this class.