pub async fn fetch_discovery(
host: &Url,
client: &Client,
) -> Result<Discovery, Error>Available on crate feature
client only.Expand description
Fetches the /.well-known/nodeinfo discovery document from host.
host should be a full base URL (including scheme), e.g.
https://mastodon.social.
ยงErrors
Returns Error::InvalidUrl if host cannot be joined with the
well-known path, Error::Http for network failures, and
Error::BadStatus / Error::Json for invalid responses.