From 1092840d9da22a4a2de4ce465774ece0b5ce2fdc Mon Sep 17 00:00:00 2001 From: Philipp Schneider Date: Fri, 13 May 2022 21:40:02 +0200 Subject: [PATCH] Use application/json in request headers --- library/Phue/Transport/Adapter/Curl.php | 1 + 1 file changed, 1 insertion(+) diff --git a/library/Phue/Transport/Adapter/Curl.php b/library/Phue/Transport/Adapter/Curl.php index a209f83..4a3973b 100644 --- a/library/Phue/Transport/Adapter/Curl.php +++ b/library/Phue/Transport/Adapter/Curl.php @@ -61,6 +61,7 @@ public function send($address, $method, $body = null) curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true); if (strlen($body)) { + curl_setopt($this->curl, CURLOPT_HTTPHEADER, array('Content-Type: application/json', 'Accept: application/json')); curl_setopt($this->curl, CURLOPT_POSTFIELDS, $body); }