Function activitypub_federation::fetch::webfinger::build_webfinger_response
source · pub fn build_webfinger_response(subject: String, url: Url) -> Webfinger
Expand description
Builds a basic webfinger response for the actor.
It assumes that the given URL is valid both to the view the actor in a browser as HTML, and
for fetching it over Activitypub with activity+json
. This setup is commonly used for ease
of discovery.
let subject = "acct:nutomic@lemmy.ml".to_string();
let url = Url::parse("https://lemmy.ml/u/nutomic")?;
build_webfinger_response(subject, url);