cancel
Showing results for 
Search instead for 
Did you mean: 

Send Binary Data in REST Request

Occasional Contributor

Send Binary Data in REST Request

I am looking for a way to send a Protocol Buffer request using a REST Request. The content type for the request is application/x-protobuf. I have written a groovy script that creates a byte array representing the request. My question is how do I set the request body to this byte array ?

Looking at the general properties API, I see that they all work on strings and I don't see a way to set a property value to a byte array. Is there a way to set the request body content ? (You can do this using property expansion for only strings)

Thank you,

Rahul
3 REPLIES 3
Not applicable

Re: Send Binary Data in REST Request

Hi, I am having the same question, because I need to send compressed/binary data instead of human-readable xml as the content of my POST request.
Unfortunately there is no answer yet to this old posting. But I hope that someone will answer now when I bring this up again.
Many thanks in advance!
Not applicable

Re: Send Binary Data in REST Request

Hi,

I get exactly the same problem with you. Did you have your answer? Could you please share the solution for everyone?

Regards,

Sam
Occasional Contributor

Re: Send Binary Data in REST Request

I have the same issue, anyone managed a way to do this?

New Here?
Join us and watch the welcome video:
Watch the new Interview
Top Kudoed Authors