@injectivelabs/grpc-web-node-http-transport
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

@improbable-eng/grpc-web-node-http-transport

Node HTTP Transport for use with @improbable-eng/grpc-web

Usage

When making a gRPC request, specify this transport:

import { grpc } from '@improbable-eng/grpc-web';
import { NodeHttpTransport } from '@improbable-eng/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 "@injectivelabs/grpc-web";
import { NodeHttpTransport } from "@improbable-eng/grpc-web-node-http-transport";

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

Readme

Keywords

none

Package Sidebar

Install

npm i @injectivelabs/grpc-web-node-http-transport

Weekly Downloads

25,160

Version

0.0.2

License

Apache-2.0

Unpacked Size

13.1 kB

Total Files

7

Last publish

Collaborators

  • albertchon
  • bangjelkoski
  • markuswaas
  • hmoragrega
  • shanemoore
  • thomasralee
  • mmeloni
  • ivan-angelkoski
  • danidomi
  • proofofze
  • nicolasbaum
  • dbrajovic
  • frederick-injective