You are here

public function FeedsHTTPFetcherAppendHeadersResult::getRaw in Feeds HTTPFetcher Append Headers 7

Overrides FeedsFetcherResult::getRaw();

Overrides FeedsFetcherResult::getRaw

File

plugins/FeedsHTTPFetcherAppendHeaders.inc, line 29
Home of the FeedsHTTPFetcherAppendHeaders and related classes.

Class

FeedsHTTPFetcherAppendHeadersResult
Result of FeedsHTTPFetcherAppendHeaders::fetch().

Code

public function getRaw() {
  feeds_include_library('http_request.inc', 'http_request');
  module_load_include('inc', 'feeds_httpfetcher_append_headers', 'libraries/feeds_httpfetcher_append_headers_request');
  $result = feeds_httpfetcher_append_headers_request_get($this->url, NULL, NULL, TRUE, $this->timeout, $this->append_headers);
  if (!in_array($result->code, array(
    200,
    201,
    202,
    203,
    204,
    205,
    206,
  ))) {
    throw new Exception(t('Download of @url failed with code !code.', array(
      '@url' => $this->url,
      '!code' => $result->code,
    )));
  }
  return $this
    ->sanitizeRaw($result->data);
}