Last active
January 3, 2016 23:49
-
-
Save bjartwolf/8537113 to your computer and use it in GitHub Desktop.
filestream
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Route("")] | |
public HttpResponseMessage GetResult() | |
{ | |
var fs = new FileStream(@"C:\data\medline13n0701.xml.gz"), FileMode.Open); | |
var response = new HttpResponseMessage(HttpStatusCode.OK) | |
{ | |
Content = new StreamContent(fs) | |
}; | |
response.Content.Headers.ContentType = new MediaTypeHeaderValue("application/xml"); | |
response.Content.Headers.ContentEncoding.Add("gzip"); | |
return response; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment