Fix #36: Add example of case-insensitive access to headers

This commit is contained in:
Zach Borboa
2014-04-02 22:35:00 -07:00
parent 88ba4b21c2
commit 20d5b6956e
+8
View File
@@ -87,6 +87,14 @@ $curl->setOpt(CURLOPT_ENCODING , 'gzip');
$curl->get('https://www.example.com/image.png');
```
```php
// Case-insensitive access to headers.
$curl = new Curl();
$curl->get('https://www.example.com/image.png');
echo $curl->response_headers['Content-Type'] . "\n"; // image/png
echo $curl->response_headers['CoNTeNT-TYPE'] . "\n"; // image/png
```
```php
$curl->close();
```