How to use the grpc-web.GrpcWebClientBase function in grpc-web

To help you get started, weโ€™ve selected a few grpc-web examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github johanbrandhorst / grpc-web-compatibility-test / frontend / grpcWeb / proto / EchoServiceClientPb.ts View on Github external
constructor (hostname: string,
               credentials?: null | { [index: string]: string; },
               options?: null | { [index: string]: string; }) {
    if (!options) options = {};
    if (!credentials) credentials = {};
    options['format'] = 'binary';

    this.client_ = new grpcWeb.GrpcWebClientBase(options);
    this.hostname_ = hostname;
    this.credentials_ = credentials;
    this.options_ = options;
  }
github johanbrandhorst / grpc-web-compatibility-test / frontend / grpcWebText / proto / EchoServiceClientPb.ts View on Github external
constructor (hostname: string,
               credentials?: null | { [index: string]: string; },
               options?: null | { [index: string]: string; }) {
    if (!options) options = {};
    if (!credentials) credentials = {};
    options['format'] = 'text';

    this.client_ = new grpcWeb.GrpcWebClientBase(options);
    this.hostname_ = hostname;
    this.credentials_ = credentials;
    this.options_ = options;
  }
github ngx-grpc / core / projects / core / src / lib / grpc-client.ts View on Github external
constructor(
    private settings: GrpcClientSettings,
  ) {
    this.client = new GrpcWebClientBase(this.settings);
  }
github nelhage / crossme / client / src / pb / CrossmeServiceClientPb.ts View on Github external
constructor (hostname: string,
               credentials?: null | { [index: string]: string; },
               options?: null | { [index: string]: string; }) {
    if (!options) options = {};
    if (!credentials) credentials = {};
    options['format'] = 'text';

    this.client_ = new grpcWeb.GrpcWebClientBase(options);
    this.hostname_ = hostname;
    this.credentials_ = credentials;
    this.options_ = options;
  }
github berty / berty / client / packages / bridge / rpc / rpc.grpcweb.js View on Github external
export const rpcWithHostname = hostname => {
  const client = new grpc.GrpcWebClientBase()
  return {
    onStatus: callback => client.on('status', callback),
    unaryCall: unary(client, hostname),
    streamCall: stream(client, hostname),
  }
}