pub struct PageResponse {Show 25 fields
pub content: Option<Vec<u8>>,
pub content_map: Option<HashMap<String, Bytes>>,
pub headers: Option<HeaderMap>,
pub remote_addr: Option<SocketAddr>,
pub cookies: Option<HeaderMap>,
pub status_code: StatusCode,
pub final_url: Option<String>,
pub error_for_status: Option<Result<Response, Error>>,
pub screenshot_bytes: Option<Vec<u8>>,
pub openai_credits_used: Option<Vec<OpenAIUsage>>,
pub extra_ai_data: Option<Vec<AIResults>>,
pub gemini_credits_used: Option<Vec<GeminiUsage>>,
pub extra_gemini_data: Option<Vec<AIResults>>,
pub remote_multimodal_usage: Option<Vec<AutomationUsage>>,
pub extra_remote_multimodal_data: Option<Vec<AutomationResults>>,
pub waf_check: bool,
pub bytes_transferred: Option<f64>,
pub signature: Option<u64>,
pub response_map: Option<HashMap<String, f64>>,
pub request_map: Option<HashMap<String, f64>>,
pub anti_bot_tech: AntiBotTech,
pub metadata: Option<Box<Metadata>>,
pub duration: Option<Instant>,
pub spawn_pages: Option<Vec<String>>,
pub content_truncated: bool,
}Expand description
The response of a web page.
Fields§
§content: Option<Vec<u8>>The page response resource.
content_map: Option<HashMap<String, Bytes>>spider_cloud only.Additional content keyed by return format (populated when multiple
formats are requested via [SpiderCloudConfig::with_return_formats]).
headers: Option<HeaderMap>The headers of the response. (Always None if a webdriver protocol is used for fetching.).
remote_addr: Option<SocketAddr>remote_addr only.The remote address of the page.
cookies only.The cookies of the response.
status_code: StatusCodeThe status code of the request.
final_url: Option<String>The final url destination after any redirects.
error_for_status: Option<Result<Response, Error>>The message of the response error if any.
screenshot_bytes: Option<Vec<u8>>chrome only.The screenshot bytes of the page. The ScreenShotConfig bytes boolean needs to be set to true.
openai_credits_used: Option<Vec<OpenAIUsage>>openai only.The credits used from OpenAI in order.
extra_ai_data: Option<Vec<AIResults>>openai only.The extra data from the AI, example extracting data etc…
gemini_credits_used: Option<Vec<GeminiUsage>>gemini only.The credits used from Gemini in order.
extra_gemini_data: Option<Vec<AIResults>>gemini only.The extra data from the Gemini AI.
remote_multimodal_usage: Option<Vec<AutomationUsage>>The usage from remote multimodal automation (extraction, etc.). Works with both Chrome and HTTP-only crawls.
extra_remote_multimodal_data: Option<Vec<AutomationResults>>The extra data from the remote multimodal automation (extraction results, etc.). Works with both Chrome and HTTP-only crawls.
waf_check: boolA WAF was found on the page.
bytes_transferred: Option<f64>The total bytes transferred for the page. Mainly used for chrome events. Inspect the content for bytes when using http instead.
signature: Option<u64>The signature of the page to use for handling de-duplication.
response_map: Option<HashMap<String, f64>>chrome only.All of the response events mapped with the amount of bytes used.
request_map: Option<HashMap<String, f64>>chrome only.All of the request events mapped with the time period of the event sent.
anti_bot_tech: AntiBotTechThe anti-bot tech used.
metadata: Option<Box<Metadata>>The metadata of the page.
duration: Option<Instant>time only.The duration of the request.
spawn_pages: Option<Vec<String>>URLs to spawn as new pages from OpenPage actions. These are URLs the automation agent requested to open in new tabs. The caller (website.rs) should create new pages for these using the browser.
content_truncated: boolWhether the response content was truncated due to a stream error, chunk idle timeout, or Content-Length mismatch (fewer bytes received than expected).
Trait Implementations§
Source§impl Debug for PageResponse
impl Debug for PageResponse
Source§impl Default for PageResponse
impl Default for PageResponse
Source§fn default() -> PageResponse
fn default() -> PageResponse
Auto Trait Implementations§
impl Freeze for PageResponse
impl !RefUnwindSafe for PageResponse
impl Send for PageResponse
impl Sync for PageResponse
impl Unpin for PageResponse
impl UnsafeUnpin for PageResponse
impl !UnwindSafe for PageResponse
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more