I have a grpc server, and I'm wondering if it's possible to make it accept
JSON and protobuf payload simultaneously? I want to use the server for both
backend and frontend communications.
By that I mean, if I have a proto definition like this:
service Greeter {
rpc SayHello (HelloRequest) returns (HelloReply) {}
}
message HelloRequest {
string name = 1;
}
message HelloReply {
string message = 1;
}
and set up a grpc server to listen at port 1234 for example. Obviously I
can use grpc client to talk to it via port 1234. But Is it possible that I
can send an http request with a particular JSON payload and path to the
same port, that can call the SayHello on the server?
I heard it's pretty expansive to encode and decode protobuf with
javascript, so I hope I could keep using JSON and make grpc accept it
automatically.
Is that something already feasible?
I use Golang btw.
Thanks in advance.
--
You received this message because you are subscribed to the Google Groups
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit
https://groups.google.com/d/msgid/grpc-io/b6030d8d-1689-4d61-ba4b-3179fe0cd726%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.