refactor: Reuse Video::getHttpResponse() where possible

This commit is contained in:
Pierre Rudloff 2019-04-21 22:38:27 +02:00
parent e93ab7ed13
commit 97a7830196
2 changed files with 4 additions and 12 deletions

View file

@ -562,11 +562,11 @@ class Video
*
* @return Response
*/
public function getHttpResponse()
public function getHttpResponse(array $headers = [])
{
$client = new Client();
$urls = $this->getUrl();
return $client->request('GET', $urls[0], ['stream' => true]);
return $client->request('GET', $urls[0], ['stream' => true, 'headers' => $headers]);
}
}