Fix html formatting; default to `application/json` when no format parameter is given. Fix #466