I need help, I make the request for a file using the following code:
$client = new Client(['verify' => false]);
$response = $client->request('GET', 'https://url', [
'headers' => [
'Authorization' => 'Bearer token'
]
]);
$mime = $response->getHeader('Content-Type');
$binary = $response->getBody();
The answer I receive is the following:
Content-Type: image/jpeg or other appropriate media type
Content-Length: content-size
binary-media-data
My question is: How to store this file? I could not find anything on the internet...