Skip to content

Instantly share code, notes, and snippets.

@JakeHP
Forked from leggetter/gist:769688
Last active August 29, 2015 14:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JakeHP/6de10134aee73f384330 to your computer and use it in GitHub Desktop.
Save JakeHP/6de10134aee73f384330 to your computer and use it in GitHub Desktop.
private string GetDocumentContents(System.Web.HttpRequestBase Request)
{
string documentContents;
using (Stream receiveStream = Request.InputStream)
{
using (StreamReader readStream = new StreamReader(receiveStream, Encoding.UTF8))
{
documentContents = readStream.ReadToEnd();
}
}
return documentContents;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment