pub struct Http {
pub headers: HashMap<String, String>,
pub cookies: HashMap<String, String>,
pub warmup: Vec<String>,
pub charset: Charset,
pub timeout: Option<u64>,
pub retry: Option<Retry>,
pub rate_limit: Option<RateLimit>,
pub fetcher: FetchMode,
}Expand description
HTTP 配置块。
Fields§
§headers: HashMap<String, String>静态 cookie;也是运行时注入 clearance cookie 的落点。
warmup: Vec<String>先 GET 这些页以预热会话 cookie。
charset: Charset§timeout: Option<u64>§retry: Option<Retry>§rate_limit: Option<RateLimit>§fetcher: FetchMode取页模式(auto|reqwest|browser);默认 auto。
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Http
impl<'de> Deserialize<'de> for Http
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Http
impl StructuralPartialEq for Http
Auto Trait Implementations§
impl Freeze for Http
impl RefUnwindSafe for Http
impl Send for Http
impl Sync for Http
impl Unpin for Http
impl UnsafeUnpin for Http
impl UnwindSafe for Http
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