Skip to main content

feedparser_rs/http/
mod.rs

1/// HTTP client module for fetching feeds from URLs
2///
3/// This module provides HTTP fetching capabilities with support for:
4/// - Conditional GET (`ETag` and `Last-Modified` headers)
5/// - Automatic decompression (gzip, deflate, brotli)
6/// - Redirect following
7/// - Custom User-Agent and headers
8///
9/// # Examples
10///
11/// ```no_run
12/// use feedparser_rs::http::FeedHttpClient;
13///
14/// let client = FeedHttpClient::new().unwrap();
15/// let response = client.get(
16///     "https://example.com/feed.xml",
17///     None,  // no ETag
18///     None,  // no Last-Modified
19///     None,  // no extra headers
20/// ).unwrap();
21///
22/// if response.status == 200 {
23///     println!("Fetched {} bytes", response.body.len());
24/// }
25/// ```
26mod client;
27/// SSRF-safe DNS resolver, closing the DNS-rebinding gap for `FeedHttpClient`
28mod resolver;
29mod response;
30
31/// URL validation module for SSRF protection
32pub mod validation;
33
34pub use client::FeedHttpClient;
35pub use response::FeedHttpResponse;
36pub use validation::validate_url;