-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
request help: grpc-transcode plugin converts http/json parameters abnormally #1991
Comments
@nic-chen please take a look at this issue |
@zhoujun24 could you have a try that use format |
The form-data format does not meet our application scenarios |
I know where the problem is now. If you are interested in fixing it, welcome to pr, or I will deal with it on this weekend. |
@nic-chen I am a backend engineer. Although I am interested in APISIX, I have never used Lua. I usually develop projects in C/C++, Go and Python. If I want to fix the problem, I should learn first. The doc link of the grpc-transcode plugin on the APISIX project homepage is incorrect, it should actually be https://github.com/apache/apisix/blob/master/doc/plugins/grpc-transcode.md |
can you supply a screen capture? I can not sure which link is wrong. |
ok, close this issue |
@nic-chen Hello, When will this issue be fixed?
|
Sorry for the delay, it has been busy recently, I will fix it as soon as possible. |
Issue description
The grpc-transcode plugin, after the protocol conversion, the parameters obtained by the back-end service are inconsistent with the http request parameters
.proto:
syntax = "proto3";
package cmdb_api;
// The CmdbAPI service definition.
service CmdbAPI {
rpc GetHostIPs (IPsRequest) returns (IPsReply) {}
}
message UsageTable {
string usage = 1;
repeated string secusage = 2;
}
message IPsRequest {
repeated string region = 1;
repeated string idc = 2;
repeated UsageTable usagetables = 3;
}
message IPsReply {
repeated string ips = 1;
string message = 2;
}
Add a route:
curl http://127.0.0.1:9080/apisix/admin/routes/10000 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
{
"methods": ["POST"],
"uri": "/CmdbAPI/GetHostIPs",
"service_protocol": "grpc",
"plugins": {
"grpc-transcode": {
"proto_id": "100",
"service": "cmdb_api.CmdbAPI",
"method": "GetHostIPs"
}
},
"upstream": {
"type": "roundrobin",
"nodes": {
"127.0.0.1:9096": 1
}
}
}'
Environment
apisix version
): 1.4The text was updated successfully, but these errors were encountered: