Yep, that's how it works. On Tue, Jul 6, 2010 at 8:17 AM, David <david.kum...@gmail.com> wrote:
> 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 do something like this? > > @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 > > -- > You received this message because you are subscribed to the Google Groups > "Protocol Buffers" group. > To post to this group, send email to proto...@googlegroups.com. > To unsubscribe from this group, send email to > protobuf+unsubscr...@googlegroups.com<protobuf%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/protobuf?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To post to this group, send email to proto...@googlegroups.com. To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.