Confirm by changing [ ] to [x] below:
Version of AWS SDK for PHP?: 3.154.6
Version of PHP (php -v)?: 7.4.6
Describe the question
$downloadResult = $s3Client->getObject([
'Bucket' => 'bucket',
'Key' => 'key',
'SaveAs' => "$folderPath/$feedFileName"
]);
The above code snippet returns and instance of \Aws\Result. However, there are no methods on this instance of fetch the status code. get and search does not work.
var_dump($downloadResult->search('statusCode'));
var_dump($downloadResult->get('statusCode'));
var_dump($downloadResult->search('metadata.statusCode'));
var_dump($downloadResult->get('metadata.statusCode'));
Is there a way to get the statusCode? The last resort is to use Reflection. Seems like overkill.
Confirm by changing [ ] to [x] below:
Version of AWS SDK for PHP?: 3.154.6
Version of PHP (
php -v)?: 7.4.6Describe the question
The above code snippet returns and instance of
\Aws\Result. However, there are no methods on this instance of fetch the status code.getandsearchdoes not work.Is there a way to get the statusCode? The last resort is to use Reflection. Seems like overkill.