public function request($method, $path = null, $parameters = array())
    {
        if (null === $path) {
            $url = '/messages';
        } else {
            $url  = '/messages/'.$path;
        }

        return json_decode($this->requestRaw($method, $url, $parameters), true);
    }
public function request($method, $path = null, $parameters = array())
    {
        if (null === $path) {
            $url = '/messages';
        } else {
            $url  = '/messages/'.$path;
        }

        return json_decode($this->requestRaw($method, $url, $parameters), true);
    }
public function request ( $ method , $ path = null , $ parameters = array ( ) ) { if ( null === $ path ) { $ url = '/messages' ; } else { $ url = '/messages/' . $ path ; } return json_decode ( $ this -> requestRaw ( $ method , $ url , $ parameters ) , true ) ; }
Request the API of MailCatcher.

@param string $method HTTP method to use (POST, PUT, GET, DELETE)
@param string $path   relative path from '/messages' (ex: null, '132.json')
@param array  $parameters parameters to POST

@return string response body
Request the API of MailCatcher .