Skip to content

Commit cbfbd66

Browse files
committed
Show a more complete first example
1 parent e2efcfb commit cbfbd66

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,17 @@ use \Curl\Curl;
4343

4444
$curl = new Curl();
4545
$curl->get('https://www.example.com/');
46+
47+
if ($curl->error) {
48+
echo 'Error: ' . $curl->errorCode . ': ' . $curl->errorMessage;
49+
} else {
50+
echo 'Response:' . "\n";
51+
var_dump($curl->response);
52+
}
4653
```
4754

4855
```php
56+
// https://www.example.com/search?q=keyword
4957
$curl = new Curl();
5058
$curl->get('https://www.example.com/search', array(
5159
'q' => 'keyword',

0 commit comments

Comments
 (0)