public function send()
    {
        $url = $this->getURL();
        $data = $this->getData();
        $method = $this->getMethod();

        $ch = curl_init();
        $options = $this->_options;
        curl_setopt_array($ch, array(
            CURLOPT_USERAGENT => $options->useragent,
            CURLOPT_CONNECTTIMEOUT => $options->connection_timeout,
            CURLOPT_TIMEOUT => $options->timeout,
            CURLOPT_RETURNTRANSFER => true,
            CURLINFO_HEADER_OUT => true,
            CURLOPT_SSL_VERIFYPEER => $options->ssl,
            CURLOPT_HEADER => false,
        ));

        $headers = array();
        //if data is string then
        //set the authorization header
        //A Hack to make the linked-in work wihtout affecting
        //other services
        if (is_string($this->_data)) {
            $headers[] = $this->_internal_request->to_header();
            $headers[] = 'Content-Type: text/plain';
        }

        if (!empty($headers)) {
            curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
        }

        switch ($method) {
            case AnHttpRequest::POST  :
                curl_setopt($ch, CURLOPT_POST, true);
                if (!empty($data)) {
                    curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
                }
                break;
            case AnHttpRequest::PUT    :
                curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT');
                if (!empty($data)) {
                    curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
                }
                break;
            case AnHttpRequest::DELETE:
                curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');
                if (!empty($data)) {
                    curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
                }
        }

        curl_setopt($ch, CURLOPT_URL, $url);

        $response = curl_exec($ch);

        return new ComConnectOauthResponse($response, curl_getinfo($ch));
    }