Restores a Response from the HTTP headers and body.
array $headers An array of HTTP headers for the Response:
string $body The Response body:
private function restoreResponse($headers, $body = null) {
$status = $headers['X-Status'][0];
unset($headers['X-Status']);
if (null !== $body) {
$headers['X-Body-File'] = array(
$body,
);
}
return new Response($body, $status, $headers);
}