Derek
Derek

Reputation: 11915

Does it make sense to create a RESTful service that I can send a binary file to?

As the question states - I want to send a binary file to a webservice. Does it make sense to think of this in a REST kind of way? Does it make sense to "POST" binary data, and how would you set up the receiving web service?

I am working in grails, and I am trying to set up a service that will allow one web service to pass it a file, and then pass the file back after some processing.

Upvotes: 3

Views: 817

Answers (1)

Darrel Miller
Darrel Miller

Reputation: 142174

Yes, this is a perfectly valid scenario. Just set the request content-type to application/octet-stream and the server can read the stream of bytes and do whatever it wants with it.

Upvotes: 2

Related Questions