grpc-websocket-proxy icon indicating copy to clipboard operation
grpc-websocket-proxy copied to clipboard

Probably a mistake in example

Open dnovikoff opened this issue 5 years ago • 1 comments

Probably the example service should be.

service EchoService {
  rpc Echo(stream EchoRequest) returns (stream EchoResponse) {
    option (google.api.http) = {get: "/echo"};
  }
  rpc Stream(Empty) returns (stream EchoResponse) {
    option (google.api.http) = {get: "/stream"};
  }
  rpc Heartbeats(stream Empty) returns (stream Heartbeat) {
    option (google.api.http) = {post: "/heartbeats"};
  }
}

Because now both Echo and Stream methods points to the same /echo location. Also the echo should probably be get not post based on what i have tested with JS example.

I could have make a PR, but I don't know which versions you use to generate.

dnovikoff avatar Oct 22 '20 18:10 dnovikoff

@dnovikoff thanks for pointing this out -- I'm happy to accept a modernization of the codegen here to use buf to make the output more stable -- is that something you'd be open to helping with?

tmc avatar Jan 01 '22 23:01 tmc