pub struct Args {Show 33 fields
pub url: String,
pub endpoint: Option<String>,
pub token: Option<String>,
pub browser: String,
pub browser_bin: Option<PathBuf>,
pub render: String,
pub tab: String,
pub wait: String,
pub headers: Vec<String>,
pub cookies: Vec<String>,
pub user_agent: Option<String>,
pub evaluate_after_wait: Vec<String>,
pub want: Vec<String>,
pub method: String,
pub data: Option<String>,
pub data_file: Option<PathBuf>,
pub form: Vec<String>,
pub network_bodies: NetworkBodiesArg,
pub network_body_max_bytes: u64,
pub network_redact: NetworkRedactArg,
pub out: Option<PathBuf>,
pub cookie_jar: Option<PathBuf>,
pub no_cookie_jar: bool,
pub observe_main_wait_ms: u64,
pub max_response_bytes: u64,
pub retry: u32,
pub backoff_ms: u64,
pub proxy: Option<String>,
pub ca_cert: Option<PathBuf>,
pub tls_insecure: bool,
pub timeout: String,
pub capture_ws: bool,
pub capture_sse: bool,
}Fields§
§url: StringURL to fetch.
endpoint: Option<String>CDP endpoint of a running host. Omit to spawn an inline ephemeral host for this one fetch.
token: Option<String>Bearer token, if the host was started with --token-secret.
browser: StringBrowser backend for the inline host: auto, chromium, chrome, chrome_shell, fingerprint-chromium, edge, brave, lightpanda, camoufox. Ignored when –endpoint-url is set (the host owns its browser).
browser_bin: Option<PathBuf>Browser binary path for the inline host, for when auto-discovery can’t find one. Ignored when –endpoint-url is set.
render: StringRender strategy: none (HTTP fast path, no browser), auto (HTTP first, escalate to the browser on failure), or always (browser only).
tab: StringTab target to use. “new” allocates a temporary target and closes it after fetch; an id reuses that target and leaves it open.
wait: StringReadiness signal before capture on the browser path:
load | idle | selector:
headers: Vec<String>Add a request header (repeatable). Format: Name: value.
Add a request cookie (repeatable). Format: name=value.
user_agent: Option<String>Override the User-Agent header for this fetch.
evaluate_after_wait: Vec<String>JavaScript to evaluate after the wait condition resolves (repeatable). Runs in page context before artifacts are captured.
want: Vec<String>Artifacts to capture, comma-separated. Omit for all of: body, rendered_html, text, screenshot, network, console, observation (storage is opt-in only).
method: StringHTTP method. Common values: POST, PUT, PATCH, DELETE.
data: Option<String>Request body as a string. Prefix with @ to read from a file path
(e.g. --data @payload.json). Mutually exclusive with --form.
data_file: Option<PathBuf>Request body from a file path. Mutually exclusive with --form.
form: Vec<String>Add a form field (repeatable). Sends body as
application/x-www-form-urlencoded. Mutually exclusive with --data.
Format: key=value.
network_bodies: NetworkBodiesArgCapture response bodies for network requests: off, xhr (XHR/fetch only), or all.
network_body_max_bytes: u64Per-body cap for captured network bodies, in bytes.
network_redact: NetworkRedactArgRedact sensitive values in network.json: on or off. On by default; off writes raw Authorization/Cookie headers and token-bearing query params to the artifact — only disable for trusted local debugging.
out: Option<PathBuf>Directory to write artifacts into. Defaults to an afhttp-out
subdirectory of the working directory.
Override the cookie-jar path. The default — derived from the host’s
GET /profile — places the jar at <profile-dir>/cookies.jar.json.
This override is rejected with invalid_argument if it does not
match the host’s profile path; the flag exists for tests and
forensic tooling, not production sessions. Honors
AFHTTP_COOKIE_JAR when omitted (same validation applies).
Opt out of cookie-jar persistence for this fetch. No cookies are
replayed from the jar and no Set-Cookie responses are merged
back.
observe_main_wait_ms: u64Upper bound on the browser-path wait for the main document network event, in milliseconds. Raise for slow networks or low-end machines.
max_response_bytes: u64Upper bound on the HTTP-path response body, in bytes. Default
1 GiB (1073741824). 0 disables the cap entirely. When the
cap is hit, the fetch returns successfully with a
network_body_truncated warning and the prefix bytes that
were collected.
retry: u32Number of additional attempts after the first. Retries fire
only when the error has retryable: true (e.g.
host_unreachable, cdp_timeout); non-retryable failures
(tls_error, wait_selector_unmatched, etc.) short-circuit.
Default 0 = single attempt.
backoff_ms: u64Fixed delay between retries, in milliseconds.
proxy: Option<String>Per-fetch upstream HTTP/HTTPS proxy for the HTTP fast path.
The SDK never honors HTTP_PROXY from the environment; this
flag is the only way to route an HTTP-path fetch through one.
Format: http://user:pass@host:port or socks5://host:port.
ca_cert: Option<PathBuf>Path to a PEM file containing extra root CAs to trust for this fetch’s HTTP path. Useful for self-signed staging or corporate MITM CAs.
tls_insecure: boolDisable TLS certificate verification for this fetch’s HTTP path. Dangerous; leaves the connection open to MITM. Use only against known-self-signed environments.
timeout: StringOverall fetch timeout (e.g. 30s, 1500ms).
capture_ws: boolCapture WebSocket frame payloads to network-bodies/
capture_sse: boolCapture SSE event payloads to network-bodies/
Trait Implementations§
Source§impl Args for Args
impl Args for Args
Source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§impl FromArgMatches for Args
impl FromArgMatches for Args
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.