nice-grpc-client-middleware-devtools
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

nice-grpc-client-middleware-devtools npm version

Client middleware for nice-grpc that enables seeing grpc-web requests in grpc-web-tools.

Installation

npm install nice-grpc-client-middleware-devtools

Usage

import {
  createClientFactory,
  createChannel,
  ClientError,
  Status,
} from 'nice-grpc';
import {devtoolsLoggingMiddleware} from 'nice-grpc-client-middleware-devtools';

const clientFactory = createClientFactory().use(devtoolsLoggingMiddlware);

const channel = createChannel(address);
const client = clientFactory.create(ExampleService, channel);

const response = await client.exampleMethod(request);
// The request and response will be visible in the Browser extension

Alternatively, only logging for unary requests can be achieved by using devtoolsUnaryLoggingMiddleware or logging for streaming requests by using devtoolsStreamLoggingMiddleware.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.3
    285
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.3
    285
  • 1.0.2
    923
  • 1.0.1
    0

Package Sidebar

Install

npm i nice-grpc-client-middleware-devtools

Weekly Downloads

1,208

Version

1.0.3

License

MIT

Unpacked Size

25.9 kB

Total Files

7

Last publish

Collaborators

  • aikoven