private function buildHeader($content)
    {
        $auth = $this->authToken;

        if ($this->authId) {
            $auth = "Basic " . base64_encode($this->authId.":".$this->authToken);
        }

        $header = $this->buildRequestUrl();

        $header .= "Host: {$this->host}\r\n";
        $header .= "Authorization: ".$auth."\r\n";
        $header .= "Content-Type: application/json\r\n";
        $header .= "Content-Length: " . strlen($content) . "\r\n";
        $header .= "\r\n";
        return $header;
    }