Add support for multipart responses. Work in progress.

I think it's better to keep the old logic[1] here. We don't need to have `mixed` as a `$format` (see my next comment for explanation).

[1]
```php
$response_format = (in_array($request->getMethod(), array('GET', 'HEAD')) && $format == 'stream')
  ? 'stream'
  : 'json';
```