How to parse HTTP message from another node to a gRPC server

不羁的心 提交于 2019-12-08 14:48:47

问题


I could successfully run a gRPC client and gRPC server in c++ now I wish to establish a communication between node A and gRPC server i.e. node B as in the attached image.

Are there any examples which I can refer to below is what I am looking for.

I have this node A with http message (GET method) which I need to parse i.e extract the message and run the request on node C. What is that I should look for in between Node A and gRPC server.

Thanks in Advance


回答1:


Most of the times, if you have to use HTTP to contact a gRPC node, it most likely means that A is in fact a browser or browser-like environment, since you can simply instantiate a gRPC client on pretty much anything else.

If that's your situation, then I'd suggest having a look at grpc-web which aims to address that specific situation.



来源:https://stackoverflow.com/questions/49852761/how-to-parse-http-message-from-another-node-to-a-grpc-server

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!