public static function matchRequest($regexp, $method, $url, $query_data = null, $body = null, array $headers = array(), array $options = array())
    {
        $response = self::request($method, $url, $query_data, $body, $headers, $options);

        $result = preg_match($regexp, $response);

        if (false === $result) {
            throw new pakeException("There's some error with this regular expression: ".$regexp);
        }

        if (0 === $result) {
            throw new pakeException("HTTP Response didn't match against regular expression: ".$regexp);
        }

        pake_echo_comment('HTTP response matched against '.$regexp);
    }
public static function matchRequest($regexp, $method, $url, $query_data = null, $body = null, array $headers = array(), array $options = array())
    {
        $response = self::request($method, $url, $query_data, $body, $headers, $options);

        $result = preg_match($regexp, $response);

        if (false === $result) {
            throw new pakeException("There's some error with this regular expression: ".$regexp);
        }

        if (0 === $result) {
            throw new pakeException("HTTP Response didn't match against regular expression: ".$regexp);
        }

        pake_echo_comment('HTTP response matched against '.$regexp);
    }
public static function matchRequest ( $ regexp , $ method , $ url , $ query_data = null , $ body = null , array $ headers = array ( ) , array $ options = array ( ) ) { $ response = self :: request ( $ method , $ url , $ query_data , $ body , $ headers , $ options ) ; $ result = preg_match ( $ regexp , $ response ) ; if ( false === $ result ) { throw new pakeException ( "There's some error with this regular expression: " . $ regexp ) ; } if ( 0 === $ result ) { throw new pakeException ( "HTTP Response didn't match against regular expression: " . $ regexp ) ; } pake_echo_comment ( 'HTTP response matched against ' . $ regexp ) ; }
execute HTTP Request and match response against PCRE regexp

@param string $regexp PCRE regexp
@param string $method
@param string $url
@param mixed $query_data string or array
@param mixed $body string or array
@param array $headers
@param array $options
@return void
execute HTTP Request and match response against PCRE regexp