This seems like it should be doable. Is there some reason you can't store
the payload in binary format in a separate file?

On Tue, Jun 26, 2018 at 9:22 AM <[email protected]> wrote:

> Hello,
>
> I already implemented with spring boots REST services, whichs allows me to
> GET the encoded payload in x-protobuf with the CURL command:
>
> 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 [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/protobuf.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.

Reply via email to