Is it ok to return application/octet-stream from a REST interface? -


Am I removing application / octat-stream for my responses and breaking any law in the REST Bible? The remaining end point 5 receives the image url.

  {"image1": "http://ww.o.com/1.gif", "image2": "http: // www .foo.be/2.gif" }  

and it will download them and return them as an application / octet-stream.

Clarification : This customer, who invites the rest of the interface, is a mobile app. Each additional network connection made will reduce the battery life to a few million. I am compelled to use the rest because it is a company standard. If not, then I will do my own binary protocol.

This is not very good, as the client does not know what to do with these binary data, But to store those bytes somewhere or forward them to any other process (if this is all your data, then it's fine).

IMO can put a look at content types, a multiparted message that has many image / gif parts, will be a better option.


Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -