Spritetm / libesphttpd

NOTE: THIS CODE IS UNMAINTAINED. Please take a look at https://github.com/chmorgan/libesphttpd instead.
125 stars 109 forks source link

Adding default content types for XML and JSON responses #17

Closed spiralman closed 8 years ago

spiralman commented 8 years ago

This updates the default file extension -> content type mapping to include XML and JSON. I found having an XML template useful for returning a device description for the SSDP protocol (where you have to return a rather large XML document, with just one value generated dynamically), but needed this to get the content type header correct.

I also added JSON, since that is a common HTTP interchange format, and others might find it useful.