Make :status in requests be a stream error

This commit is contained in:
Anthony Ramine
2021-10-19 12:40:27 +02:00
committed by Sean McArthur
parent 8520f06f93
commit c38c94cb16
4 changed files with 39 additions and 4 deletions

View File

@@ -575,6 +575,11 @@ impl Pseudo {
}
}
#[cfg(feature = "unstable")]
pub fn set_status(&mut self, value: StatusCode) {
self.status = Some(value);
}
pub fn set_scheme(&mut self, scheme: uri::Scheme) {
let bytes_str = match scheme.as_str() {
"http" => BytesStr::from_static("http"),