MCPcopy Create free account
hub / github.com/AI45Lab/Code / mcp_config_object_accepts_streamable_http_alias

Function mcp_config_object_accepts_streamable_http_alias

sdk/python/src/lib.rs:7403–7424  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7401
7402 #[test]
7403 fn mcp_config_object_accepts_streamable_http_alias() {
7404 let config = normalize_mcp_server_config(serde_json::json!({
7405 "name": "remote",
7406 "transport": {
7407 "type": "streamable_http",
7408 "url": "https://example.com/mcp",
7409 "headers": { "Authorization": "Bearer token" }
7410 }
7411 }))
7412 .unwrap();
7413
7414 match config.transport {
7415 a3s_code_core::mcp::protocol::McpTransportConfig::StreamableHttp { url, headers } => {
7416 assert_eq!(url, "https://example.com/mcp");
7417 assert_eq!(
7418 headers.get("Authorization").map(String::as_str),
7419 Some("Bearer token")
7420 );
7421 }
7422 _ => panic!("expected streamable-http transport"),
7423 }
7424 }
7425
7426 // ---- orchestration conversion + pipeline-stage bridge (#43) ----
7427

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected