Merge pull request #42 from zborboa-google/master

Fix #41: Add PUT example
This commit is contained in:
Zach Borboa
2014-04-11 12:04:50 -07:00
+14
View File
@@ -0,0 +1,14 @@
<?php
require '../src/Curl.class.php';
// curl -X PUT -d "id=1&first_name=Zach&last_name=Borboa" "http://httpbin.org/put"
$curl = new Curl();
$curl->put('http://httpbin.org/put', array(
'id' => 1,
'first_name' => 'Zach',
'last_name' => 'Borboa',
));
echo 'Data server received via PUT:' . "\n";
var_dump($curl->response->form);