Skip to content

Instantly share code, notes, and snippets.

@mandykoh
Created April 25, 2010 00:44
Show Gist options
  • Save mandykoh/378068 to your computer and use it in GitHub Desktop.
Save mandykoh/378068 to your computer and use it in GitHub Desktop.
var stream = /* Some System.IO.Stream */
using (var contentSource = new ChunkedStreamSerialiser(stream)) {
var response = new HttpResponse(HttpStatuses.OK, "OK");
response.Headers.Set("Content-Type", "application/octet-stream");
response.Body = contentSource;
/* Do something with the response ... */
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment