public function FeedsHTTPFetcherAppendHeaders::fetch in Feeds HTTPFetcher Append Headers 7
Implements FeedsFetcher::fetch().
File
- plugins/
FeedsHTTPFetcherAppendHeaders.inc, line 56 - Home of the FeedsHTTPFetcherAppendHeaders and related classes.
Class
- FeedsHTTPFetcherAppendHeaders
- Fetches data via HTTP and appending custom headers.
Code
public function fetch(FeedsSource $source) {
$source_config = $source
->getConfigFor($this);
$append_headers = $this
->prepareAppendHeaders($this->config['append_headers']);
$fetcher_result = new FeedsHTTPFetcherAppendHeadersResult($source_config['source'], $append_headers);
// When request_timeout is empty, the global value is used.
$fetcher_result
->setTimeout($this->config['request_timeout']);
return $fetcher_result;
}