Method
CurlResponse::getDownloadedBytes
Return the number of bytes downloaded so far, or null before cURL has reported any progress.
Description#
public CurlResponse::getDownloadedBytes(): ?intReturn values#
?int
Examples#
$response = $client->get('https://example.com/big.iso');
$body = $response->getBody();
while (!$body->eof()) {
$body->read(65536);
echo $response->getDownloadedBytes(), " of ", $response->getDownloadSize(), "\n";
}See also#
CurlResponse::getDownloadSizeReturn the number of bytes cURL expects to download, or null before cURL has reported it.