public static function pollZot($url, $data)
{
- // @todo Check if this endpoint might be queried via a POST
- $curlResult = DI::httpClient()->get($url, [HttpClientOptions::ACCEPT_CONTENT => HttpClient::ACCEPT_DEFAULT]);
+ $curlResult = DI::httpClient()->get($url, [HttpClientOptions::ACCEPT_CONTENT => HttpClient::ACCEPT_JSON]);
if ($curlResult->isTimeout()) {
return $data;
}
Logger::info('Updating directory: ' . $arr['url']);
if (strlen($arr['url'])) {
- DI::httpClient()->fetch($dir . '?url=' . bin2hex($arr['url']), 0, HttpClient::ACCEPT_DEFAULT);
+ DI::httpClient()->fetch($dir . '?url=' . bin2hex($arr['url']), 0, HttpClient::ACCEPT_HTML);
}
return;