public function request($resourceUrl, array $params = array())
    {
        $params = array('url' => $resourceUrl) + $params;

        $url = $this->setUrlParams($this->endpoint, $params);

        $data = $this->fetchUrl($url);

        if (self::TYPE_JSON === $this->type) {
            return $this->createResponseFromJson($data);
        } else if (self::TYPE_XML === $this->type) {
            return $this->createResponseFromXml($data);
        }
    }