Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

grpc-web-node-http-transport

jonnyreeves240Apache-2.0deprecated0.0.1TypeScript support: included

This package has been deprecated in favor of @improbable-eng/grpc-web-node-http-transport

Node HTTP Transport for use with grpc-web-client

readme

grpc-web-node-http-transport

Node HTTP Transport for use with grpc-web-client

Usage

When making a gRPC request, specify this transport:

import { grpc } from 'grpc-web-client';
import { NodeHttpTransport } from 'grpc-web-node-http-transport';

grpc.invoke(MyService.DoQuery, {
  host: "https://example.com",
  transport: NodeHttpTransport(),
  /* ... */
})

Alternatively specify the Default Transport when your server/application bootstraps:

import { grpc } from "grpc-web-client";
import { NodeHttpTransport } from "grpc-web-node-http-transport";

// Do this first, before you make any grpc requests!
grpc.setDefaultTransport(NodeHttpTransport());