feat(lib): remove extern Url type usage
BREAKING CHANGE: The `Url` type is no longer used. Any instance in the `Client` API has had it replaced with `hyper::Uri`. This also means `Error::Uri` has changed types to `hyper::error::UriError`. The type `hyper::header::parsing::HTTP_VALUE` has been made private, as an implementation detail. The function `http_percent_encoding` should be used instead.
This commit is contained in:
@@ -24,8 +24,8 @@ fn main() {
|
||||
}
|
||||
};
|
||||
|
||||
let url = hyper::Url::parse(&url).unwrap();
|
||||
if url.scheme() != "http" {
|
||||
let url = url.parse::<hyper::Uri>().unwrap();
|
||||
if url.scheme() != Some("http") {
|
||||
println!("This example only works with 'http' URLs.");
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user