File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
crates/rmcp/src/transport/streamable_http_server Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,19 @@ impl Default for StreamableHttpServerConfig {
44
44
}
45
45
}
46
46
47
+ /// # Streamable Http Server
48
+ ///
49
+ /// ## Extract information from raw http request
50
+ ///
51
+ /// The http service will consume the request body, however the rest part will be remain and injected into [`crate::model::Extensions`],
52
+ /// which you can get from [`crate::service::RequestContext`].
53
+ /// ```rust
54
+ /// use rmcp::handler::server::tool::Extension;
55
+ /// use http::request::Parts;
56
+ /// async fn my_tool(Extension(parts): Extension<Parts>) {
57
+ /// tracing::info!("http parts:{parts:?}")
58
+ /// }
59
+ /// ```
47
60
pub struct StreamableHttpService < S , M = super :: session:: local:: LocalSessionManager > {
48
61
pub config : StreamableHttpServerConfig ,
49
62
session_manager : Arc < M > ,
You can’t perform that action at this time.
0 commit comments