pub struct CreateSessionOptions {
pub profile_id: Option<String>,
pub recording: bool,
pub stealth: bool,
pub captcha: bool,
pub web_bot_auth: bool,
pub proxy: Option<ProxySpec>,
}Expand description
Options accepted by POST /sessions.
Falsy fields are omitted from the request body; if every field is falsy the request is sent with no body at all.
Fields§
§profile_id: Option<String>Attach a stored browser profile (cookies + localStorage).
recording: boolEnable session recording. Off by default.
stealth: boolEnable the runtime stealth shim. Off by default.
captcha: boolEnable managed captcha solving. Requires stealth.
web_bot_auth: boolOpt in to Cloudflare Web Bot Auth — sign every outbound HTTP request
with an Ed25519 key registered to our verified bot directory.
Independent of stealth; silently inert if the acquired slot has no
signing key configured.
proxy: Option<ProxySpec>Request managed proxy egress. Requires stealth.
Implementations§
Source§impl CreateSessionOptions
impl CreateSessionOptions
pub fn new() -> Self
pub fn profile_id(self, id: impl Into<String>) -> Self
pub fn recording(self, on: bool) -> Self
pub fn stealth(self, on: bool) -> Self
pub fn captcha(self, on: bool) -> Self
pub fn web_bot_auth(self, on: bool) -> Self
pub fn proxy(self, spec: impl Into<ProxySpec>) -> Self
Trait Implementations§
Source§impl Clone for CreateSessionOptions
impl Clone for CreateSessionOptions
Source§fn clone(&self) -> CreateSessionOptions
fn clone(&self) -> CreateSessionOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CreateSessionOptions
impl Debug for CreateSessionOptions
Source§impl Default for CreateSessionOptions
impl Default for CreateSessionOptions
Source§fn default() -> CreateSessionOptions
fn default() -> CreateSessionOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CreateSessionOptions
impl RefUnwindSafe for CreateSessionOptions
impl Send for CreateSessionOptions
impl Sync for CreateSessionOptions
impl Unpin for CreateSessionOptions
impl UnsafeUnpin for CreateSessionOptions
impl UnwindSafe for CreateSessionOptions
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