MCPcopy Create free account
hub / github.com/ChrisFeldmeier/OpenCodeRust / http

Method http

crates/opencode-mcp/src/client.rs:197–206  ·  view source on GitHub ↗

Create a client that communicates over StreamableHTTP.

(
        server_name: String,
        tool_registry: Arc<McpToolRegistry>,
        url: String,
        headers: Option<HashMap<String, String>>,
    )

Source from the content-addressed store, hash-verified

195 }
196 /// Create a client that communicates over StreamableHTTP.
197 pub async fn http(
198 server_name: String,
199 tool_registry: Arc<McpToolRegistry>,
200 url: String,
201 headers: Option<HashMap<String, String>>,
202 ) -> Result<Self, McpClientError> {
203 let client = Self::new(server_name, tool_registry);
204 client.connect_http(url, headers).await?;
205 Ok(client)
206 }
207
208 /// Create a client that communicates over SSE.
209 pub async fn sse(

Callers

nothing calls this directly

Calls 2

newFunction · 0.85
connect_httpMethod · 0.80

Tested by

no test coverage detected