function rootQuery($path, $content = array(), $method = 'GET') {
$file = @file_get_contents("$this->_url/" . ltrim($path, '/'), false, stream_context_create(array('http' => array(
'method' => $method,
- 'content' => $content === null ? $content : json_encode($content),
- 'header' => 'Content-Type: application/json',
+ 'content' => $content !== null ? json_encode($content) : $content,
+ 'header' => $content !== null ? 'Content-Type: application/json' : array(),
'ignore_errors' => 1, // available since PHP 5.2.10
'follow_location' => 0,
'max_redirects' => 0,