From 15e6fbba20d3a48c1363365c05400ea919538851 Mon Sep 17 00:00:00 2001 From: Simon Frings Date: Wed, 25 Aug 2021 13:35:25 +0200 Subject: [PATCH] Update example to new eventloop and new S3 API --- README.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index effade4..a2e20a6 100644 --- a/README.md +++ b/README.md @@ -15,16 +15,17 @@ Once [installed](#install), you can use the following code to read a file from your S3 file storage: ```php -$loop = React\EventLoop\Factory::create(); -$browser = new React\Http\Browser($loop); +read('example.txt')->then(function (string $contents) { echo $contents; +}, function (Exception $e) { + echo 'Error: ' . $e->getMessage() . PHP_EOL; }); - -$loop->run(); ``` ## Install