Class UnaryWithHeaders

java.lang.Object
io.deephaven.web.client.api.grpc.UnaryWithHeaders

public class UnaryWithHeaders extends Object
  • Constructor Details

    • UnaryWithHeaders

      public UnaryWithHeaders()
  • Method Details

    • call

      public static <Req, Res> elemental2.promise.Promise<UnaryOutput<Res>> call(String host, BrowserHeaders metadata, RpcOptions options, Object methodDescriptor, Req request)
      Improbable-eng's grpc-web implementation doesn't pass headers to api callers - this changes the contract a bit so that we can get a typed UnaryOutput with the headers/trailers intact.
      Type Parameters:
      Res - type of the message object
      Parameters:
      host - the server to connect to
      metadata - gRPC metadata to set on the request
      options - options to use when sending the request
      methodDescriptor - the service method to invoke
      Returns:
      a promise that will resolve to the response plus headers/trailers, or reject with the headers/trailers