Socket
Socket
Sign inDemoInstall

nice-grpc-client-middleware-devtools

Package Overview
Dependencies
3
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    nice-grpc-client-middleware-devtools

Client middleware for nice-grpc to work with grpc-web-devtools https://github.com/SafetyCulture/grpc-web-devtools


Version published
Weekly downloads
564
decreased by-29.76%
Maintainers
1
Install size
297 kB
Created
Weekly downloads
 

Readme

Source

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.

FAQs

Last updated on 11 Mar 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc