seanmonstar / reqwest

An easy and powerful Rust HTTP Client
https://docs.rs/reqwest
Apache License 2.0
9.96k stars 1.13k forks source link

Using a dedicated type for IRIs (and URLs) #2475

Closed Dietr1ch closed 2 weeks ago

Dietr1ch commented 2 weeks ago

Hi,

Would you consider using dedicated types for IRIs?

This is still pre-1.0, but using iri_string instead of raw &str or String seems more appropriate.

I understand that keeping existing code using reqwest with regular strings would be a must even before reqwest gets to 1.0, but allowing users to type new code properly would be great.

Dietr1ch commented 2 weeks ago

nvm, I see you use the url library and my problem is that there's no easy From between the IRI and URL libraries.