Permalink
Browse files

Minor house keeping after merging pull request

  • Loading branch information...
stefangabos committed Jan 9, 2019
1 parent 083376c commit a41f087626163689655fce9686f7838aab7fe7f7
Showing with 10 additions and 10 deletions.
  1. +5 −5 README.md
  2. +5 −5 examples/custom-headers.php
@@ -144,19 +144,19 @@ $curl = new Zebra_cURL();
$curl->download('https://abs.twimg.com/a/1362101114/images/resources/twitter-bird-callout.png', 'cache');
```

**Request with custom headers**
**Use custom HTTP headers**

```php
// Include the library
// include the library
require 'path/to/Zebra_cURL.php';
// Instantiate the Zebra_cURL class
// instantiate the Zebra_cURL class
$curl = new Zebra_cURL;
// Set custom headers with option method
// set custom HTTP headers
$curl->option(CURLOPT_HTTPHEADER, [
'accept: application/json',
'X-Token-Foo-Bar: ABC123' // Pass keys to api's for example
'X-Token-Foo-Bar: ABC123' // Pass keys to APIs, for example
]);
echo $curl->scrap('http://httpbin.org/get') . PHP_EOL;
@@ -1,15 +1,15 @@
<?php
// Include the library
// include the library
require __DIR__ . '/../Zebra_cURL.php';
// Instantiate the Zebra_cURL class
// instantiate the Zebra_cURL class
$curl = new Zebra_cURL;
// Set custom headers with option method
// set custom HTTP headers
$curl->option(CURLOPT_HTTPHEADER, [
'accept: application/json',
'X-Token-Foo-Bar: ABC123' // Pass keys to api's for example
'X-Token-Foo-Bar: ABC123' // Pass keys to APIs, for example
]);
echo $curl->scrap('http://httpbin.org/get') . PHP_EOL;
echo $curl->scrap('http://httpbin.org/get') . PHP_EOL;

0 comments on commit a41f087

Please sign in to comment.