Skip to content

Instantly share code, notes, and snippets.

@Nate-Wilkins
Created October 1, 2014 21:50
Show Gist options
  • Save Nate-Wilkins/b9caa54ce3c6bb5cf6fb to your computer and use it in GitHub Desktop.
Save Nate-Wilkins/b9caa54ce3c6bb5cf6fb to your computer and use it in GitHub Desktop.
Get (generated) js file
HttpResponseMessage result = new HttpResponseMessage(HttpStatusCode.OK);
result.Content = new ByteArrayContent(File.ReadAllBytes("path"));
result.Content.Headers.ContentType = new MediaTypeHeaderValue("application/javascript");
return result;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment