Hi, I am trying to implement protocol buffers for client/server using REST. I am still a bit confused if I need to send protocol buffers request in byte format?
I mean, in my client code, do I need to serialize object to byte array? For example
protoRequest.build.toByteArray()
And in the server, do I need to c
@POST
@Consumes("application/octet-stream")
public byte[] processProtoRequest(byte[] protoRequest) {
ProtoRequest.Builder request = ProtoRequest.newBuilder();
request.mergeFrom(protoRequest)
}
Is this the right thing to do?
Thanks
David