Function libdav::sd::find_context_url

source ·
pub async fn find_context_url<C>(
    client: &WebDavClient<C>,
    service: DiscoverableService,
) -> Result<Option<Uri>, BootstrapError>
where C: Connect + Clone + Sync + Send,
Expand description

Find a CalDav or CardDav context path via client bootstrap sequence.

Determines the server’s real host and the context path of the resources for a server, following the discovery mechanism described in rfc6764.

This resolves from “user friendly” URLs to the real URL where the CalDav or CardDav server is advertised as running. For example, a user may understand their CalDav server as being https://example.com but bootstrapping would reveal it to actually run under https://instance31.example.com/users/john@example.com/calendars/.

§Errors

If any of the underlying DNS or HTTP requests fail, or if any of the responses fail to parse.

Does not return an error if DNS records are missing, only if they contain invalid data.