3 namespace Drupal\migrate_plus;
6 * Defines an interface for data fetchers.
8 * @see \Drupal\migrate_plus\Annotation\DataFetcher
9 * @see \Drupal\migrate_plus\DataFetchPluginBase
10 * @see \Drupal\migrate_plus\DataFetcherPluginManager
13 interface DataFetcherPluginInterface {
16 * Set the client headers.
18 * @param array $headers
19 * An array of the headers to set on the HTTP request.
21 public function setRequestHeaders(array $headers);
24 * Get the currently set request headers.
26 public function getRequestHeaders();
32 * URL to retrieve from.
35 * Content at the given url.
37 public function getResponseContent($url);
40 * Return Http Response object for a given url.
43 * URL to retrieve from.
45 * @return \Psr\Http\Message\ResponseInterface
46 * The HTTP response message.
48 public function getResponse($url);