Add additional examples to cover supported request methods

This commit is contained in:
Zach Borboa
2016-10-12 08:06:15 -07:00
parent fada23bbba
commit 27abd4899a
8 changed files with 125 additions and 14 deletions
+20
View File
@@ -0,0 +1,20 @@
<?php
require __DIR__ . '/vendor/autoload.php';
use \Curl\Curl;
// curl --request PATCH "https://httpbin.org/patch" --data "a=1&b=2&c=3"
$curl = new Curl();
$curl->patch('https://httpbin.org/patch', array(
'a' => '1',
'b' => '2',
'c' => '3',
));
if ($curl->error) {
echo 'Error: ' . $curl->errorCode . ': ' . $curl->errorMessage;
} else {
echo 'Response:' . "\n";
var_dump($curl->response);
}