mirror of
https://github.com/YGGverse/ggemini.git
synced 2026-04-01 01:25:32 +00:00
draft new api version
This commit is contained in:
parent
8a5f1e2a57
commit
3cde80b6a8
22 changed files with 323 additions and 747 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue