Skip to content

Commit 03f642e

Browse files
committed
Update README.md
1 parent 33ab9f9 commit 03f642e

File tree

1 file changed

+22
-4
lines changed

1 file changed

+22
-4
lines changed

README.md

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,30 @@
11
# PHP Curl Client
22

3-
43
A very simple curl client - less than 100 lines. Perfect for being a base class.
54

5+
6+
## Examples
7+
8+
```php
9+
use Curl\Client;
10+
11+
$client = new Client();
12+
$response = $client->get('https://stackoverflow.com');
13+
14+
// 200
15+
$status = $response->status;
16+
17+
// HTML content
18+
$body = $response->body;
19+
20+
// curl_error() OR null
21+
$error = $response->error;
22+
23+
// curl_info() array
24+
$info = $response->info;
25+
```
26+
627
## TODO
728

829
- make PSR-7 and PSR-18 compatible
930

10-
### Links
11-
12-
- https://github.com/tpyo/amazon-s3-php-class

0 commit comments

Comments
 (0)