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

will picture will · Jun 19, 2009 · Viewed 28k times · Source

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 email attachments.

Answer

Chris W. Rea picture Chris W. Rea · Jun 19, 2009

An enum doesn't make much sense. MIME types are open-ended. That is, the list is not finite: new types are added from time to time.

See RFC4288: Media Type Specifications and Registration Procedures