public function dispatchResponse($response)
    {
        $parts = explode("\r\n\r\n", $response, 2);

        if (count($parts) < 2) {
            $this->throwException();
        }

        list($headersAsString, $body) = $parts;

        $headers = explode("\r\n", $headersAsString);
        list($code, $status) = $this->dispatchHttpStatus(array_shift($headers));
        $headers = $this->dispatchHeaders($headers);

        /** @var Emagedev_Utils_Model_Curl_Response $responseObject */
        $responseObject = Mage::getModel('emagedev_utils/curl_response');

        return $responseObject->setData(
            array(
                'code' => $code,
                'status' => $status,
                'headers_as_string' => $headersAsString,
                'headers' => $headers,
                'body' => $body
            )
        );
    }
public function dispatchResponse($response)
    {
        $parts = explode("\r\n\r\n", $response, 2);

        if (count($parts) < 2) {
            $this->throwException();
        }

        list($headersAsString, $body) = $parts;

        $headers = explode("\r\n", $headersAsString);
        list($code, $status) = $this->dispatchHttpStatus(array_shift($headers));
        $headers = $this->dispatchHeaders($headers);

        /** @var Emagedev_Utils_Model_Curl_Response $responseObject */
        $responseObject = Mage::getModel('emagedev_utils/curl_response');

        return $responseObject->setData(
            array(
                'code' => $code,
                'status' => $status,
                'headers_as_string' => $headersAsString,
                'headers' => $headers,
                'body' => $body
            )
        );
    }
public function dispatchResponse ( $ response ) { $ parts = explode ( "\r\n\r\n" , $ response , 2 ) ; if ( count ( $ parts ) < 2 ) { $ this -> throwException ( ) ; } list ( $ headersAsString , $ body ) = $ parts ; $ headers = explode ( "\r\n" , $ headersAsString ) ; list ( $ code , $ status ) = $ this -> dispatchHttpStatus ( array_shift ( $ headers ) ) ; $ headers = $ this -> dispatchHeaders ( $ headers ) ; /** @var Emagedev_Utils_Model_Curl_Response $responseObject */ $ responseObject = Mage :: getModel ( 'emagedev_utils/curl_response' ) ; return $ responseObject -> setData ( array ( 'code' => $ code , 'status' => $ status , 'headers_as_string' => $ headersAsString , 'headers' => $ headers , 'body' => $ body ) ) ; }
Get response code, headers, status, body

@param string $response

@return Omedrec_Welcome_Model_Curl_Response
Get response code headers status body