From b21a840b8f68f1a88be38e9506ab44ed89c78704 Mon Sep 17 00:00:00 2001 From: Michael Dowling Date: Sun, 30 Mar 2014 15:40:51 -0700 Subject: [PATCH] Fixing method in index.rst --- docs/index.rst | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/docs/index.rst b/docs/index.rst index c06e0bf3..5c55b9d8 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -20,16 +20,13 @@ the pain out of consuming web services. .. code-block:: php $client = new GuzzleHttp\Client(); - $response = $client->get('http://guzzlephp.org'); - $res = $client->get('https://api.github.com/user', ['auth' => ['user', 'pass']]); - echo $res->statusCode(); - // 200 - echo $res->getHeader('content-type'); - // 'application/json; charset=utf8' - echo $res->getBody(); - // {"type":"User"...' - var_export($res->json()); - // Outputs the JSON decoded data + $res = $client->get('https://api.github.com/user', [ + 'auth' => ['user', 'pass'] + ]); + echo $res->getStatusCode(); // 200 + echo $res->getHeader('content-type'); // 'application/json; charset=utf8' + echo $res->getBody(); // {"type":"User"...' + var_export($res->json()); // Outputs the JSON decoded data User guide ----------