Rest application octet stream

2020-04-05 13:37

Jul 11, 2016 Join GitHub today. GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.While I was working with the REST API to upload an image using RestSharp, I encountered a problem uploading it. I Googled the problem but did not find a specific answer for it. Although I found the solution and thought to share it since it can save a lot of time for other developers. rest application octet stream

My requirement is, I should send a 10MB zip file to the client with a restful service. I found the code in forums that sending a StreamingOutput object is the better way, but how can I create a

Stack Exchange network consists of 175 Q& A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share Simply serve your file data using GET and using one of the factory methods of (part of the JAXRS API, so you're not locked into Jersey): If you don't have an actual File object, but an InputStream, Response. ok(entity, mediaType) should berest application octet stream The question comes to what is in that response. If the API return an octetstream then the content is binary. If the content is really binary (like an image or a pdf file) then there is not much we can do.

Rating: 4.45 / Views: 303

Rest application octet stream free