mirror of
https://github.com/php-curl-class/php-curl-class.git
synced 2026-08-26 10:59:19 +00:00
Merge pull request #42 from zborboa-google/master
Fix #41: Add PUT example
This commit is contained in:
@@ -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);
|
||||
Reference in New Issue
Block a user