diff --git a/examples/post_json.php b/examples/post_json.php index 9675a27..15ab0ec 100644 --- a/examples/post_json.php +++ b/examples/post_json.php @@ -8,11 +8,11 @@ use \Curl\Curl; // -d "{"id":"1","content":"Hello world!","date":"2015-06-30 19:42:21"}" \ // "https://httpbin.org/post" -$data = json_encode(array( +$data = array( 'id' => '1', 'content' => 'Hello world!', 'date' => date('Y-m-d H:i:s'), -)); +); $curl = new Curl(); $curl->setHeader('Content-Type', 'application/json');