Json submit

@pld It would be really helpful for us if responses could have a content type `application/json` and a json body (for success and error responses).

If its possible, maybe the responses could like something like:

Error response:

```javascript
{
  reason: "Insert reason here"
}
```

Success response for something like a PUT or POST:

```javascript
{
  reply: "Insert success response here" 
}
```

Happy with the json looking differently though, those are just suggestions. Thoughts?