From 2bfd5e8ecbeb5619c06430769e321dc5890e2a35 Mon Sep 17 00:00:00 2001 From: Stanley Cheung Date: Mon, 9 Sep 2019 12:55:50 -0700 Subject: [PATCH] Added API for simple unary call --- javascript/net/grpc/web/genericclient.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/javascript/net/grpc/web/genericclient.js b/javascript/net/grpc/web/genericclient.js index 275149eb..d439937e 100644 --- a/javascript/net/grpc/web/genericclient.js +++ b/javascript/net/grpc/web/genericclient.js @@ -21,9 +21,20 @@ const GenericClient = function() {}; * this RPC method * @param {!Metadata} metadata The user defined request metadata. * @return {!Promise>} A promise that resolves to the - * response message + * response message and metadata * @template REQUEST, RESPONSE */ GenericClient.prototype.unaryCall = goog.abstractMethod; +/** + * @param {!REQUEST} request The request proto message + * @param {!MethodDescriptor} methodDescriptor Information of + * this RPC method + * @param {!Metadata=} metadata The user defined request metadata. + * @return {!Promise} A promise that resolves to the + * response message + * @template REQUEST, RESPONSE + */ +GenericClient.prototype.call = goog.abstractMethod; + exports = GenericClient;