Package io.deephaven.web.client.api.grpc
Class UnaryWithHeaders
java.lang.Object
io.deephaven.web.client.api.grpc.UnaryWithHeaders
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <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.
-
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 tometadata
- gRPC metadata to set on the requestoptions
- options to use when sending the requestmethodDescriptor
- the service method to invoke- Returns:
- a promise that will resolve to the response plus headers/trailers, or reject with the headers/trailers
-