Create a client that communicates over SSE.
(
server_name: String,
tool_registry: Arc<McpToolRegistry>,
url: String,
headers: Option<HashMap<String, String>>,
)
| 207 | |
| 208 | /// Create a client that communicates over SSE. |
| 209 | pub async fn sse( |
| 210 | server_name: String, |
| 211 | tool_registry: Arc<McpToolRegistry>, |
| 212 | url: String, |
| 213 | headers: Option<HashMap<String, String>>, |
| 214 | ) -> Result<Self, McpClientError> { |
| 215 | let client = Self::new(server_name, tool_registry); |
| 216 | client.connect_sse(url, headers).await?; |
| 217 | Ok(client) |
| 218 | } |
| 219 | |
| 220 | // -- Connection methods --------------------------------------------------- |
| 221 |
nothing calls this directly
no test coverage detected