Now checks content headers and defaults to json if appropriate.
Merge pull request #8 from JulianBirch/master

Defaults format to json if content-type header says so