update example with new api version

This commit is contained in:
yggverse 2024-12-14 06:28:48 +02:00
parent 7e9c574d4a
commit 54fabd241b

View file

@ -43,9 +43,10 @@ fn main() -> ExitCode {
// route by status code // route by status code
match response.meta.status { match response.meta.status {
// is code 20, handle `GIOStream` by content type // is code 20, handle `GIOStream` by content type
Status::Success => match response.meta.mime { Status::Success => match response.meta.mime.unwrap().value.as_str() {
// is gemtext, see also ggemtext crate! // is gemtext, see ggemtext crate to parse
Some(Mime::TextGemini) => todo!(), "text/gemini" => todo!(),
// other types
_ => todo!(), _ => todo!(),
}, },
_ => todo!(), _ => todo!(),