mirror of
https://github.com/YGGverse/ggemini.git
synced 2026-03-31 09:05:45 +00:00
update example with new api version
This commit is contained in:
parent
7e9c574d4a
commit
54fabd241b
1 changed files with 4 additions and 3 deletions
|
|
@ -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!(),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue