5 ms·
The article states GitHub gists add the correct content-type header based on file extension which is untrue. curl -i https://gist.githubusercontent.com/mikek
by anonfunction 12y ago
The article states GitHub gists add the correct content-type header based on file extension which is untrue.
curl -i https://gist.githubusercontent.com/mikeknoop/e7b3c526738b66950eb4/raw/1d46d432ed380abc986cf15028221318b836395b/text.xml
// other headers...
Content-Type: text/plain
// headers and body...
There is a great service call rawgit[1] that does actually add the correct headers.
[1] https://rawgit.com/ https://rawgit.com/
- mikeknoop 12y agoGood catch, looks like maybe Github removed this feature (I know for sure it used to work with `.json` extensions. Updating the post, thank you!