CDPEx.Fetch (CDPEx v0.4.0)

Copy Markdown View Source

Per-page handler for the CDP Fetch domain, backing CDPEx.Page.authenticate/4.

When armed on a page it enables Fetch with handleAuthRequests, then:

  • auto-continues every paused request (Fetch.requestPausedFetch.continueRequest) so navigation proceeds normally, and
  • answers authentication challenges (Fetch.authRequiredFetch.continueWithAuth) with the configured credentials.

Because Fetch.enable pauses every request, each one round-trips through this process — measurable overhead on resource-heavy pages. The handler is tied to the page's connection and stops when it goes down.

This is an internal building block; use CDPEx.Page.authenticate/4.

Summary

Functions

Returns a specification to start this module under a supervisor.

Types

t()

@type t() :: %CDPEx.Fetch{
  attempts: term(),
  browser: term(),
  conn: term(),
  password: term(),
  session_id: term(),
  source: term(),
  username: term()
}

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.