public function FeedsHTTPFetcherResult::getRaw in Feeds 7.2
Overrides FeedsFetcherResult::getRaw().
Throws
FeedsHTTPRequestException In case the result code of the HTTP request is not in the 2xx series.
Overrides FeedsFetcherResult::getRaw
File
- plugins/
FeedsHTTPFetcher.inc, line 56
Class
- FeedsHTTPFetcherResult
- Result of FeedsHTTPFetcher::fetch().
Code
public function getRaw() {
if ($this
->rawExists()) {
return parent::getRaw();
}
// Include HTTP functions.
feeds_include_library('http_request.inc', 'http_request');
// Try to fetch the data from a URL.
$result = feeds_http_request($this->url, array(
'accept_invalid_cert' => $this->acceptInvalidCert,
'timeout' => $this->timeout,
'cache_http_result' => $this->cacheHttpResult,
));
http_request_check_result($this->url, $result);
$this->raw = $result->data;
return $this
->sanitizeRawOptimized($this->raw);
}