···516516 {
517517 true
518518 }
519519- Ok(_) => false,
519519+ // A 401 without WWW-Authenticate flows through as Ok(Response) with 401 status.
520520+ // Check the status code directly to catch expired tokens signalled via body JSON.
521521+ Ok(resp) if resp.status() == http::StatusCode::UNAUTHORIZED => true,
520522 _ => false,
521523 }
522524}
···8989 .map(|did| did.to_cowstr())
9090 .collect(),
9191 );
9292- let request = GetTimeline::new().limit(args.limit).build();
9292+ let request: GetTimeline = GetTimeline::new().limit(args.limit).build();
93939494 println!("\nFetching timeline with {} posts...\n", args.limit);
9595
+2-2
examples/public_atproto_feed.rs
···1515 .to_owned();
16161717 // Feed of posts about the AT Protocol
1818- let feed_uri =
1818+ let feed_uri: AtUri =
1919 AtUri::new_static("at://did:plc:oio4hkxaop4ao4wz2pp3f4cr/app.bsky.feed.generator/atproto")
2020 .unwrap();
21212222 let request = GetFeed::new().feed(feed_uri).limit(10).build();
23232424- let response = http.xrpc(&base.borrow()).send(&request).await?;
2424+ let response = http.xrpc(base.borrow()).send(&request).await?;
2525 let output = response.into_output()?;
26262727 println!("Latest posts from the AT Protocol feed:\n");
+2-2
examples/read_whitewind_post.rs
···1616 let args = Args::parse();
17171818 // Parse the at:// URI
1919- let uri = AtUri::new(&args.uri)?;
1919+ let uri = AtUri::new(args.uri.as_str())?;
20202121 // Create an unauthenticated agent for public record access
2222 let agent = BasicClient::unauthenticated();
23232424 // Use Agent's get_record helper with the at:// URI
2525- let response = agent.get_record::<Entry>(&uri).await?;
2525+ let response = agent.get_record::<Entry, _>(&uri).await?;
2626 let output = response.into_output()?;
27272828 println!("📚 WhiteWind Blog Entry\n");
+1-1
examples/resolve_did.rs
···1717 let args = Args::parse();
18181919 // Parse the handle
2020- let handle = Handle::new(&args.handle)?;
2020+ let handle = Handle::new(args.handle.as_str())?;
21212222 // Create an unauthenticated client with identity resolver
2323 let client = BasicClient::unauthenticated();