update readme

This commit is contained in:
yggverse 2025-01-25 21:29:41 +02:00
parent 67989dba63
commit aa44e2723d

View file

@ -63,25 +63,23 @@ fn main() -> ExitCode {
Ok(response) => { Ok(response) => {
// route by status code // route by status code
match response.meta.status { match response.meta.status {
// is code 20, handle `GIOStream` by content type // code 20, handle `GIOStream` by content type
Status::Success => match response.meta.mime.unwrap().value.as_str() { Status::Success => match response.meta.mime.unwrap().value.as_str() {
// is gemtext, see ggemtext crate to parse // gemtext, see ggemtext crate to parse
"text/gemini" => todo!(), "text/gemini" => todo!(),
// other types // other content types
_ => todo!(), _ => todo!(),
}, },
_ => todo!(), _ => todo!(),
} }
} }
Err(e) => todo!("{e}"), Err(_) => todo!(),
}, },
); );
ExitCode::SUCCESS ExitCode::SUCCESS
} }
``` ```
* to send requests using Titan protocol, see `titan_request_async` implementation
## Other crates ## Other crates
* [ggemtext](https://github.com/YGGverse/ggemtext) - Glib-oriented Gemtext API * [ggemtext](https://github.com/YGGverse/ggemtext) - Glib-oriented Gemtext API