MCPcopy Index your code
hub / github.com/ChrisFeldmeier/OpenCodeRust / parse_http_json

Function parse_http_json

crates/opencode-cli/src/main.rs:3682–3691  ·  view source on GitHub ↗
(
    response: reqwest::Response,
)

Source from the content-addressed store, hash-verified

3680}
3681
3682async 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
3693async fn handle_mcp_command(server: String, action: McpCommands) -> anyhow::Result<()> {
3694 let client = reqwest::Client::new();

Callers 4

resolve_remote_sessionFunction · 0.85
latest_versionFunction · 0.85
handle_mcp_commandFunction · 0.85

Calls 2

statusMethod · 0.45
textMethod · 0.45

Tested by

no test coverage detected