sideshowcoder / canned

Server to respond with fake API responses, by using a directory of files for finding out what to say!
213 stars 46 forks source link

`contentType` file header #30

Closed creynders closed 10 years ago

creynders commented 10 years ago

Hiya,

I added the possibility to use a contentType header in your files to allow overriding the default content types of 'application/json' etc.

E.g.:

//! contentType: "application/vnd.custom+xml"
<xml>
    <created>1</created>
</xml>

The same restrictions as with statusCode apply:

  1. must be on the first line
  2. comma-separated to declare multiple headers

Hope you like it, I sure can use it.

sideshowcoder commented 10 years ago

Looks good thanks for this :+1: would be great if you could add something about in the readme as well (as well as yourself as a contributor if you like).

creynders commented 10 years ago

Ah yes, of course!

sideshowcoder commented 10 years ago

This looks good, thanks!