podal/src/feed/get.rs
Paul Campbell 9057adddc3
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
i5-add-tests (part 2) (#7)
closes kemitix/podal#5

Reviewed-on: #7
Co-authored-by: Paul Campbell <pcampbell@kemitix.net>
Co-committed-by: Paul Campbell <pcampbell@kemitix.net>
2023-07-28 18:35:41 +01:00

9 lines
235 B
Rust

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