* @throws \Exception */
(string $uri, WhatsNewResult $entry)
| 104 | * @throws \Exception |
| 105 | */ |
| 106 | protected function queryChangesServer(string $uri, WhatsNewResult $entry): IResponse |
| 107 | { |
| 108 | $headers = []; |
| 109 | if ($entry->getEtag() !== '') { |
| 110 | $headers['If-None-Match'] = [$entry->getEtag()]; |
| 111 | } |
| 112 | |
| 113 | $entry->setLastCheck(time()); |
| 114 | $client = $this->clientService->newClient(); |
| 115 | return $client->get($uri, [ |
| 116 | 'headers' => $headers, |
| 117 | ]); |
| 118 | } |
| 119 | |
| 120 | protected function evaluateResponse(IResponse $response): int |
| 121 | { |