Skip to content

Commit 6691948

Browse files
committed
fix: update SSE stream constructor
1 parent eedbb0d commit 6691948

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

crates/rmcp/src/transport/common/reqwest/streamable_http_client.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ impl StreamableHttpClient for reqwest::Client {
8484
return Err(StreamableHttpError::UnexpectedContentType(None));
8585
}
8686
}
87-
let event_stream = SseStream::from_byte_stream(response.bytes_stream()).boxed();
87+
let event_stream = SseStream::from_bytes_stream(response.bytes_stream()).boxed();
8888
Ok(event_stream)
8989
}
9090

@@ -223,7 +223,7 @@ impl StreamableHttpClient for reqwest::Client {
223223
}
224224
match content_type.as_deref() {
225225
Some(ct) if ct.as_bytes().starts_with(EVENT_STREAM_MIME_TYPE.as_bytes()) => {
226-
let event_stream = SseStream::from_byte_stream(response.bytes_stream()).boxed();
226+
let event_stream = SseStream::from_bytes_stream(response.bytes_stream()).boxed();
227227
Ok(StreamableHttpPostResponse::Sse(event_stream, session_id))
228228
}
229229
Some(ct) if ct.as_bytes().starts_with(JSON_MIME_TYPE.as_bytes()) => {

0 commit comments

Comments
 (0)