Clear extra HTTP headers for a page session.
(client: &mut CdpClient, session_id: &str)
| 49 | |
| 50 | /// Clear extra HTTP headers for a page session. |
| 51 | pub 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. |
| 66 | pub async fn list_pages(client: &mut CdpClient, format: OutputFormat) -> Result<CommandResult> { |
no test coverage detected