Waiting for nextcloud at startup

I’m running HA core on ubuntu. In HA, I use the nextcloud dav calendar (platform: caldav). Nextcloud is installed as a snap on the same machine.
When the system boots up, home assistant is faster than nextcloud and it cannot read the nextcloud calendar. So the calendar will fail and there will not be another try to read the calendar.
To wait for nextcloud, I specified “After=snap.nextcloud.apache.service” in the homeassistant.service file. But this does not help because that means HA is started after nextcloud-apache, but it does not wait for nextcloud-apache to be ready.
What else could I do to make HA wait for the nextcloud calendar?
Is it possible to wait for the URL https://nuc:444/remote.php/dav ?