mirror of
https://github.com/Orange-OpenSource/hurl.git
synced 2024-09-21 02:38:20 +03:00
Update to Rust 1.75.0
This commit is contained in:
parent
5c21023399
commit
2a500c8412
@ -8,7 +8,7 @@ description = "Hurl, run and test HTTP requests"
|
|||||||
documentation = "https://hurl.dev"
|
documentation = "https://hurl.dev"
|
||||||
homepage = "https://hurl.dev"
|
homepage = "https://hurl.dev"
|
||||||
repository = "https://github.com/Orange-OpenSource/hurl"
|
repository = "https://github.com/Orange-OpenSource/hurl"
|
||||||
rust-version = "1.74.1"
|
rust-version = "1.75.0"
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "hurl"
|
name = "hurl"
|
||||||
|
@ -674,7 +674,7 @@ impl Client {
|
|||||||
if !(300..400).contains(&response_code) {
|
if !(300..400).contains(&response_code) {
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
let location = match response.get_header_values("Location").get(0) {
|
let location = match response.get_header_values("Location").first() {
|
||||||
None => return None,
|
None => return None,
|
||||||
Some(value) => get_redirect_url(value, base_url),
|
Some(value) => get_redirect_url(value, base_url),
|
||||||
};
|
};
|
||||||
|
@ -90,7 +90,7 @@ impl Request {
|
|||||||
/// Returns optional Content-type header value.
|
/// Returns optional Content-type header value.
|
||||||
pub fn content_type(&self) -> Option<String> {
|
pub fn content_type(&self) -> Option<String> {
|
||||||
header::get_values(&self.headers, "Content-Type")
|
header::get_values(&self.headers, "Content-Type")
|
||||||
.get(0)
|
.first()
|
||||||
.cloned()
|
.cloned()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ impl Response {
|
|||||||
/// Returns optional Content-type header value.
|
/// Returns optional Content-type header value.
|
||||||
pub fn content_type(&self) -> Option<String> {
|
pub fn content_type(&self) -> Option<String> {
|
||||||
header::get_values(&self.headers, "Content-Type")
|
header::get_values(&self.headers, "Content-Type")
|
||||||
.get(0)
|
.first()
|
||||||
.cloned()
|
.cloned()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user