Add HttpContent extension methods for helping determining whether a given content is XML or JSON. The reason why this isn't easy is that the media type can be any of a number of values. For example, for JSON, the value can be any of these:
application/json
text/json
application/vnd.collection+json
image/something+json
Similar for XML, the values can be any of these:
application/xml
text/xml
application/rdf+json
image/svg+json
We have similar helpers for detecting MIME multipart content which is equally complicated to match (albeit for other reasons).
Henrik
application/json
text/json
application/vnd.collection+json
image/something+json
Similar for XML, the values can be any of these:
application/xml
text/xml
application/rdf+json
image/svg+json
We have similar helpers for detecting MIME multipart content which is equally complicated to match (albeit for other reasons).
Henrik