pdftract/examples/test_url_host.rs
jedarden a0c3ebb237 feat(bf-5for4): design manifest schema for grep-corpus
- Add manifest.csv with header row: filename,source_url,page_count,file_size,checksum,license
- Update README.md with comprehensive schema documentation and field descriptions
- Schema supports provenance tracking, integrity verification, and license compliance

Closes bf-5for4
2026-07-05 12:21:25 -04:00

24 lines
589 B
Rust

use url::Url;
fn main() {
let urls = vec![
"https://[::1]/",
"https://[fe80::1]/",
"https://example.com/",
"https://127.0.0.1/",
];
for url_str in urls {
match Url::parse(url_str) {
Ok(url) => {
println!("URL: {}", url_str);
println!(" host_str(): {:?}", url.host_str());
println!(" host(): {:?}", url.host());
println!();
}
Err(e) => {
println!("Failed to parse {}: {}", url_str, e);
}
}
}
}