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

Function test_with_auth_header

core/src/mcp/transport/streamable_http.rs:488–496  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

486
487 #[tokio::test]
488 async fn test_with_auth_header() {
489 let mut headers = HashMap::new();
490 headers.insert("Authorization".to_string(), "Bearer token".to_string());
491 let transport = StreamableHttpTransport::connect("http://127.0.0.1:1", headers)
492 .await
493 .unwrap();
494 assert!(transport.is_connected());
495 transport.close().await.unwrap();
496 }
497
498 #[tokio::test]
499 async fn test_debug_format() {

Callers

nothing calls this directly

Calls 2

insertMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected