pub struct FetchResult {Show 25 fields
pub request_id: RequestId,
pub request_url: String,
pub final_url: String,
pub status: u16,
pub page_kind: Option<PageKind>,
pub next_action: Option<NextAction>,
pub tab_id: Option<TabId>,
pub trace: Trace,
pub warnings: Vec<Warning>,
pub content_type: Option<String>,
pub body_file: Option<PathBuf>,
pub rendered_html_file: Option<PathBuf>,
pub text_file: Option<PathBuf>,
pub content_file: Option<PathBuf>,
pub content_json_file: Option<PathBuf>,
pub screenshot_file: Option<PathBuf>,
pub network_file: Option<PathBuf>,
pub console_file: Option<PathBuf>,
pub observation_file: Option<PathBuf>,
pub storage_file: Option<PathBuf>,
pub download_file: Option<PathBuf>,
pub download_bytes: Option<u64>,
pub download_filename: Option<String>,
pub download_url: Option<String>,
pub download_state: Option<String>,
}Expand description
Result of a successful fetch. Serialized verbatim into the response
envelope; the protocol writer adds the outer code: "fetch" tag.
Fields§
§request_id: RequestId§request_url: String§final_url: String§status: u16§page_kind: Option<PageKind>§next_action: Option<NextAction>§tab_id: Option<TabId>§trace: Trace§warnings: Vec<Warning>§content_type: Option<String>Response Content-Type as the origin sent it, verbatim (parameters
included). Reported separately because body_file’s extension is a
lossy derivative of it: types outside the extension table land in
body.bin, and callers that reconstructed the type from the filename
silently lost everything the table did not cover.
body_file: Option<PathBuf>§rendered_html_file: Option<PathBuf>§text_file: Option<PathBuf>§content_file: Option<PathBuf>§content_json_file: Option<PathBuf>§screenshot_file: Option<PathBuf>§network_file: Option<PathBuf>§console_file: Option<PathBuf>§observation_file: Option<PathBuf>§storage_file: Option<PathBuf>§download_file: Option<PathBuf>§download_bytes: Option<u64>§download_filename: Option<String>§download_url: Option<String>§download_state: Option<String>Implementations§
Source§impl FetchResult
impl FetchResult
Sourcepub fn set_artifact_file(&mut self, artifact: Artifact, path: PathBuf)
pub fn set_artifact_file(&mut self, artifact: Artifact, path: PathBuf)
Convenience for setting an artifact path in its top-level *_file
field. The JSON contract intentionally does not nest these paths.
Sourcepub fn attach_takeover(&mut self, takeover_url_secret: String)
pub fn attach_takeover(&mut self, takeover_url_secret: String)
Enrich a detected wall’s next_action for afhttp fetch --takeover:
attach the human takeover URL and recommend re-fetching the same
persistent tab once the human clears the wall. No-op when no wall was
detected (no next_action).
Sourcepub fn attach_takeover_with_context(
&mut self,
takeover_url_secret: String,
expires_at_rfc3339: Option<String>,
ttl_s: Option<u64>,
scope: Option<String>,
endpoint: Option<&str>,
profile: Option<&str>,
)
pub fn attach_takeover_with_context( &mut self, takeover_url_secret: String, expires_at_rfc3339: Option<String>, ttl_s: Option<u64>, scope: Option<String>, endpoint: Option<&str>, profile: Option<&str>, )
Like Self::attach_takeover, but also makes the recommended command
self-contained for non-default hosts and explicitly shared profiles.
pub fn artifact_file(&self, artifact: Artifact) -> Option<&PathBuf>
Trait Implementations§
Source§impl Clone for FetchResult
impl Clone for FetchResult
Source§fn clone(&self) -> FetchResult
fn clone(&self) -> FetchResult
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more