pub struct ClientBuilder { /* private fields */ }Expand description
Builder for Client.
Implementations§
Source§impl ClientBuilder
impl ClientBuilder
Sourcepub fn cloud_browser_host(self, host: impl Into<String>) -> Self
pub fn cloud_browser_host(self, host: impl Into<String>) -> Self
Override the Cloud Browser host (https://browser.scrapfly.io).
Sourcepub fn danger_accept_invalid_certs(self, v: bool) -> Self
pub fn danger_accept_invalid_certs(self, v: bool) -> Self
Accept invalid TLS certificates (tests / self-signed dev hosts).
Sourcepub fn http_client(self, client: Client) -> Self
pub fn http_client(self, client: Client) -> Self
Inject a pre-built reqwest::Client. Bypasses the timeout /
TLS-verify options.
Sourcepub fn on_request(self, cb: OnRequest) -> Self
pub fn on_request(self, cb: OnRequest) -> Self
Install a pre-send request callback (used by the integration runner to capture SDK-layer attribution without installing middleware).
Sourcepub fn build(self) -> Result<Client, ScrapflyError>
pub fn build(self) -> Result<Client, ScrapflyError>
Build the client.
Trait Implementations§
Source§impl Default for ClientBuilder
impl Default for ClientBuilder
Source§fn default() -> ClientBuilder
fn default() -> ClientBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ClientBuilder
impl !RefUnwindSafe for ClientBuilder
impl Send for ClientBuilder
impl Sync for ClientBuilder
impl Unpin for ClientBuilder
impl UnsafeUnpin for ClientBuilder
impl !UnwindSafe for ClientBuilder
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