File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
crates/rmcp/src/transport/common/reqwest Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ impl StreamableHttpClient for reqwest::Client {
95
95
if let Some ( session_id) = session_id {
96
96
request = request. header ( HEADER_SESSION_ID , session_id. as_ref ( ) ) ;
97
97
}
98
- let response = request. json ( & message) . send ( ) . await ?;
98
+ let response = request. json ( & message) . send ( ) . await ?. error_for_status ( ) ? ;
99
99
if response. status ( ) == reqwest:: StatusCode :: ACCEPTED {
100
100
return Ok ( StreamableHttpPostResponse :: Accepted ) ;
101
101
}
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ async fn main() -> Result<()> {
16
16
)
17
17
. with ( tracing_subscriber:: fmt:: layer ( ) )
18
18
. init ( ) ;
19
- let transport = StreamableHttpClientTransport :: from_uri ( "http://localhost:8000" ) ;
19
+ let transport = StreamableHttpClientTransport :: from_uri ( "http://localhost:8000/mcp " ) ;
20
20
let client_info = ClientInfo {
21
21
protocol_version : Default :: default ( ) ,
22
22
capabilities : ClientCapabilities :: default ( ) ,
You can’t perform that action at this time.
0 commit comments