send accept header during crawl
[phinde.git] / src / phinde / Crawler.php
index 53320ec6cb6101f3ce61b88bc0d28c283c4514dd..f3158aa07223979239f41bca742979d159f1aa2c 100644 (file)
@@ -28,6 +28,10 @@ class Crawler
     protected function fetch($url)
     {
         $req = new HttpRequest($url);
+        $req->setHeader(
+            'accept',
+            implode(',', array_keys(static::$supportedIndexTypes))
+        );
         $res = $req->send();
         if ($res->getStatus() !== 200) {
             throw new \Exception(