public function getHeaders()
    {
        $headers = $this->response->getHeaders();
        $result = array();
        if(!is_array($headers)) {
            return $result;
        }
        foreach ($headers as $part) {
            $middle=explode(": ",$part,2);
            if(count($middle) == 2){
                $result[trim($middle[0])] = trim($middle[1]);
            }
        }
        return $result;
    }