Function nodeinfo_fetch::query_node
source · pub fn query_node(_domain: &str) -> Result<Node, Error>Expand description
Fetches the nodeinfo for the given domain.
It is recommended to use this function only for singular requests.
If you want to fetch the nodeinfo for multiple domains, create a Fetcher instead.
Example
use nodeinfo_fetch::query_node;
let client = ureq::Agent::new();
let res = query_node("joindiaspora.com", client);
dbg!(&res);
assert_eq!(res.is_ok(), true);