draft new api version

This commit is contained in:
yggverse 2024-10-26 23:22:26 +03:00
parent 8a5f1e2a57
commit 3cde80b6a8
22 changed files with 323 additions and 747 deletions

View file

@ -1,21 +1 @@
use glib::{Uri, UriFlags};
#[test]
fn single_socket_request_async() {
// Parse URI
match Uri::parse("gemini://geminiprotocol.net/", UriFlags::NONE) {
// Begin async request
Ok(uri) => ggemini::client::single_socket_request_async(uri, |result| match result {
// Process response
Ok(response) => {
// Expect success status
assert!(match response.header().status() {
Some(ggemini::client::response::header::Status::Success) => true,
_ => false,
})
}
Err(_) => assert!(false),
}),
Err(_) => assert!(false),
}
} // @TODO async
// @TODO