podal/src/feed/get.rs

10 lines
235 B
Rust
Raw Normal View History

2023-07-25 10:50:00 +01:00
use crate::prelude::*;
use atom_syndication::Feed;
pub fn reqwest_blocking_get(url: &str) -> Result<Feed> {
2023-07-25 10:50:00 +01:00
let content = reqwest::blocking::get(url)?.bytes()?;
let channel = Feed::read_from(&content[..])?;
Ok(channel)
}