Just asked this on SO: C# – Is there a library that gets the media type and subtype out of a HttpWebResponse/WebResponse ContentType?.
Anyone here or at G+ that has a hint?
The ContentType property of (Http)WebResponse maps to the HTTP/1.1 Content-Type which is a Media-Type that contains a
type
/subtype
optionally followed by parameters which are attribute=value pairs.I’m mainly interested in the
type
/subtype
and the charset parameter.The
charset
is mapped from HttpWebRequest.CharacterSet.Is there a library that just retrieves the media
type
/subtype
of the ContentType?
–jeroen
Filed under: .NET, .NET 3.0, .NET 3.5, .NET 4.0, .NET 4.5, ASP.NET, C#, C# 2.0, C# 3.0, C# 4.0, C# 5.0, Development, Software Development, Visual Studio 11, Visual Studio 2008, Visual Studio 2010, Visual Studio 2013, Visual Studio and tools
