Is there an enum for the ContentType property on a HttpWebResponse (“text/plain”, “application/octet-stream” etc.)?

前端 未结 2 797
一生所求
一生所求 2021-02-06 21:07

The closest thing I could find was System.Net.Mime.MediaTypeNames but that doesn\'t seem to have everything (like json) since it seems to be more focused around ema

2条回答
  •  萌比男神i
    2021-02-06 21:10

    IANA's database is most likely to be complete, but you would need to parse those pages to get a flat list.

    There is also the mime.types file that comes with Apache which seems to have been derived from the said list.

提交回复
热议问题