MCPcopy Create free account
hub / github.com/aeroxy/chrome-devtools-cli / clear_extra_headers

Function clear_extra_headers

src/commands/pages.rs:51–63  ·  view source on GitHub ↗

Clear extra HTTP headers for a page session.

(client: &mut CdpClient, session_id: &str)

Source from the content-addressed store, hash-verified

49
50/// Clear extra HTTP headers for a page session.
51pub async fn clear_extra_headers(client: &mut CdpClient, session_id: &str) -> Result<()> {
52 client
53 .send_to_target(
54 session_id,
55 "Network.setExtraHTTPHeaders",
56 json!({"headers": {}}),
57 )
58 .await?;
59 let _ = client
60 .send_to_target(session_id, "Network.disable", json!({}))
61 .await;
62 Ok(())
63}
64
65/// List all open page targets with their friendly names, titles, and URLs.
66pub async fn list_pages(client: &mut CdpClient, format: OutputFormat) -> Result<CommandResult> {

Callers 1

navigateFunction · 0.85

Calls 1

send_to_targetMethod · 0.80

Tested by

no test coverage detected