From bd73cbc113e3a05f1bd87e52491e5ed7ebd47a3b Mon Sep 17 00:00:00 2001 From: Zach Borboa Date: Wed, 3 Sep 2014 23:31:28 -0700 Subject: [PATCH] Add getUrl() example usage to README --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 563098c..9afa7af 100644 --- a/README.md +++ b/README.md @@ -120,11 +120,13 @@ $curl = new Curl(); $curl->setOpt(CURLOPT_USERAGENT, 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1'); $curl->success(function($instance) { - echo 'call was successful. response was' . "\n"; + $url = $instance->getUrl(); + echo 'call to "' . $url . '" was successful. response was' . "\n"; echo $instance->response . "\n"; }); $curl->error(function($instance) { - echo 'call was unsuccessful.' . "\n"; + $url = $instance->getUrl(); + echo 'call to "' . $url . '" was unsuccessful.' . "\n"; echo 'error code:' . $instance->error_code . "\n"; echo 'error message:' . $instance->error_message . "\n"; });