Closed
Description
Discussed in #403
Originally posted by smaktacular February 28, 2023
Hi,
please consider the following proto:
syntax = "proto3";
import "messages.proto";
package testpackage;
option csharp_namespace = "TestServices";
service TestService {
rpc Echo (StringRequest) returns (StringResult);
}
message StringRequest {
string str = 1;
}
message StringResult {
string str = 1;
}
with the following c# implementation:
public override Task<StringResult> Echo(StringRequest request, ServerCallContext context)
{
return Task.FromResult(new StringResult { Str = request.Str });
}
using grpcurl
grpcurl.exe -d '{ "str": "string" }' -proto .\services.proto --plaintext localhost:4711 testpackage.TestService/Echo
I get
{
"str": "string"
}
but using httpyac
proto < ./services.proto
### Test
GRPC {{hostname}}:{{port}}/testpackage.TestService/Echo
{
"str": "string"
}
I get
GRPC 0 OK
content-type: application/grpc
date: Tue, 28 Feb 2023 09:17:18 GMT
server: Kestrel
{}
While Debugging the request from httpyac I can see that the property (str) in the body is not recognized. Does anyone have an idea what would cause this difference in the two results?
Metadata
Assignees
Labels
No labels
Activity