(
response: reqwest::Response,
)
| 3680 | } |
| 3681 | |
| 3682 | async fn parse_http_json<T: for<'de> Deserialize<'de>>( |
| 3683 | response: reqwest::Response, |
| 3684 | ) -> anyhow::Result<T> { |
| 3685 | let status = response.status(); |
| 3686 | let body = response.text().await?; |
| 3687 | if !status.is_success() { |
| 3688 | anyhow::bail!("Request failed ({}): {}", status, body); |
| 3689 | } |
| 3690 | Ok(serde_json::from_str(&body)?) |
| 3691 | } |
| 3692 | |
| 3693 | async fn handle_mcp_command(server: String, action: McpCommands) -> anyhow::Result<()> { |
| 3694 | let client = reqwest::Client::new(); |
no test coverage detected