Loading

grpc使用postman测试-问题集合

问题1:postman中proto文件import问题
Unresolved "import" directives
We could not find some of the files imported by the .proto file. 
Specify import paths to those unresolved files using the options below.

image
解决方法:
项目结构如下

- code
|- pbentity
| -- xxx.proto
|- user
| -- v1
| 	--- yyy.proto

若yyy.proto引用了xxx.proto文件:import "pbentity/xxx.proto";
则在psotman的 Add an import path选择,就必须选择code的绝对路径。让psotman知道工作目录。成功之后就可以看到如下:
image

问题2:Status code: 14 UNAVAILABLE

image
解决办法:
不使用TLS
image

posted @ 2025-03-16 16:24  青山新雨  阅读(94)  评论(0)    收藏  举报