Remove unnecessary json_encode when Content-Type is application/json

This commit is contained in:
Zach Borboa
2016-01-31 22:17:59 -08:00
parent 44f09fd0f2
commit fd2fec56ae
+2 -2
View File
@@ -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');