diff --git a/README.md b/README.md index 65447ed..ba57fd4 100644 --- a/README.md +++ b/README.md @@ -15,10 +15,16 @@ Once [installed](#install), you can use the following code to decorate a demo function and avoid sending unneeded HTTP requests: ```php -$browser = new React\Http\Browser($loop); +get('http://httpbingo.org/status/' . $id)->then(function (ResponseInterface $response) { + return $browser->get( + 'http://httpbingo.org/status/' . $id + )->then(function (Psr\Http\Message\ResponseInterface $response) { return $response->getStatusCode(); }); }