Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
346 views
in Technique[技术] by (71.8m points)

node.js - How to send a request in node to an endpoint that uses grpc-web-proto?

I am trying to send an http request to this endpoint using the request library from npm, however, how would I send that payload as shown in the screenshot?

enter image description here

question from:https://stackoverflow.com/questions/65545465/how-to-send-a-request-in-node-to-an-endpoint-that-uses-grpc-web-proto

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

If you have a client that uses grpc-web and a Node server that uses one of the Node gRPC libraries, those use different protocols so you will need to use a proxy to translate between them. For example, this grpc-web documentation page describes how to configure an Envoy proxy for that purpose.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...