mirror of
https://github.com/php-curl-class/php-curl-class.git
synced 2026-08-31 04:34:27 +00:00
Fix #36: Add example of case-insensitive access to headers
This commit is contained in:
@@ -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();
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user