Feature chore bug 005 #19
@@ -51,12 +51,16 @@ async fn client_calls_tools_over_http_with_a_token_and_every_read_is_logged() {
|
||||
assert_eq!(raw.status(), reqwest::StatusCode::UNAUTHORIZED);
|
||||
|
||||
// ---- Authenticated client: list_tools + call_tool round-trip ----
|
||||
let transport = rmcp::transport::StreamableHttpClientTransport::<reqwest::Client>::from_config(
|
||||
rmcp::transport::streamable_http_client::StreamableHttpClientTransportConfig::with_uri(
|
||||
uri.clone(),
|
||||
)
|
||||
.auth_header(auth_token.clone()),
|
||||
);
|
||||
// `reqwest013` (a Cargo rename of `reqwest`, see Cargo.toml) is the exact
|
||||
// reqwest major version `rmcp`'s `StreamableHttpClient` impl is written
|
||||
// against -- distinct from the reqwest 0.12 the rest of WA depends on.
|
||||
let transport =
|
||||
rmcp::transport::StreamableHttpClientTransport::<reqwest013::Client>::from_config(
|
||||
rmcp::transport::streamable_http_client::StreamableHttpClientTransportConfig::with_uri(
|
||||
uri.clone(),
|
||||
)
|
||||
.auth_header(auth_token.clone()),
|
||||
);
|
||||
let client = ()
|
||||
.serve(transport)
|
||||
.await
|
||||
|
||||
Reference in new issue
Block a user