You are here

public function FeedsHTTPFetcherAppendHeaders::prepareAppendHeaders in Feeds HTTPFetcher Append Headers 7

1 call to FeedsHTTPFetcherAppendHeaders::prepareAppendHeaders()
FeedsHTTPFetcherAppendHeaders::fetch in plugins/FeedsHTTPFetcherAppendHeaders.inc
Implements FeedsFetcher::fetch().

File

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

Class

FeedsHTTPFetcherAppendHeaders
Fetches data via HTTP and appending custom headers.

Code

public function prepareAppendHeaders($append_headers) {
  $headers = array();
  $append_headers = explode("\n", $append_headers);
  if (is_array($append_headers)) {
    foreach ($append_headers as $header) {
      $headers[] = str_replace('|', ': ', $header);
    }
  }
  return $headers;
}