curl -X GET --header "Accept: application/x-protobuf" "[...URL...]" | protoc --decode_raw
I'll see the correct result in plaintext. The generated *.java class based on my *.proto seems to work fine.
Now I'm struggling on a really simple point: I'm not able to send my binary protobuf stream via CURL to my POST-service. I have a simple message file with human-readable JSON content (--> UploadLogs.payload) and my protofile. Based on this, I want to generate the the binary protobuf payload and want to POST-call the REST service. Do you have an idea, how I can handle this? :)
Something like...
curl -X POST --data-binary @UploadLogs.payload --header "Accept: application/x-protobuf" "[...URL...]"
Maybe, I have to save the binary protobuf content with protoc --encode first in a separate file, and then call CURL with this new filename with the --data-binary parameter. Right now, I'm not able to store the protobuf payload based on the JSON file in a new separate file.
Any help would be really appreciated! :)
Kind regards
Emily
--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+u...@googlegroups.com.
To post to this group, send email to prot...@googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.