mirror of
https://github.com/hyperium/hyper.git
synced 2026-01-25 02:16:14 +00:00
feat(body): upgrade to http-body 1.0.0-rc.2 (#3106)
This commit is contained in:
@@ -27,7 +27,7 @@ async fn echo(
|
||||
// Convert to uppercase before sending back to client using a stream.
|
||||
(&Method::POST, "/echo/uppercase") => {
|
||||
let frame_stream = req.into_body().map_frame(|frame| {
|
||||
let frame = if let Some(data) = frame.into_data() {
|
||||
let frame = if let Ok(data) = frame.into_data() {
|
||||
data.iter()
|
||||
.map(|byte| byte.to_ascii_uppercase())
|
||||
.collect::<Bytes>()
|
||||
|
||||
Reference in New Issue
Block a user