http->get(self::URL, ['w' => 550, 'h' => 512], ['Accept: image/gif,image/*']); if ($res->status !== 200) { throw new UpstreamException("Buienradar: HTTP {$res->status}"); } if (!str_starts_with($res->body, 'GIF8')) { throw new UpstreamException('Buienradar: antwoord is geen GIF'); } return $res->body; } }