pub struct Response {
pub url: String,
pub status: u16,
pub headers: HashMap<String, String>,
pub body: String,
}Expand description
统一的 HTTP 响应结构
无论底层使用 reqwest、wreq 还是 Chrome,都统一转换为该类型。
Fields§
§url: String最终请求的 URL(可能经过重定向)
status: u16HTTP 状态码
headers: HashMap<String, String>响应头
body: String响应体(文本)
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Response
impl RefUnwindSafe for Response
impl Send for Response
impl Sync for Response
impl Unpin for Response
impl UnsafeUnpin for Response
impl UnwindSafe for Response
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more