Skip to content

Instantly share code, notes, and snippets.

@einarwh
Created November 6, 2011 21:04
Show Gist options
  • Select an option

  • Save einarwh/1343484 to your computer and use it in GitHub Desktop.

Select an option

Save einarwh/1343484 to your computer and use it in GitHub Desktop.
Write base64-encoded response.
private static void WriteResponse(
HttpResponse response,
byte[] buffer)
{
response.ContentType = "plain/text";
response.Write(Convert.ToBase64String(buffer));
response.Flush();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment