Skip to content

Commit

Permalink
chore(volo-http): re-export hyper::body::Incoming as BodyIncoming
Browse files Browse the repository at this point in the history
Signed-off-by: Yu Li <[email protected]>
  • Loading branch information
yukiiiteru committed Dec 12, 2023
1 parent e74f1da commit c4cc724
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions examples/src/http/simple.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use volo_http::{
middleware::{self, Next},
response::IntoResponse,
route::{get, post, MethodRouter, Router},
Address, Bytes, ConnectionInfo, HttpContext, Incoming, Json, MaybeInvalid, Method, Params,
Address, BodyIncoming, Bytes, ConnectionInfo, HttpContext, Json, MaybeInvalid, Method, Params,
Response, Server, StatusCode, Uri,
};

Expand Down Expand Up @@ -113,7 +113,7 @@ async fn tracing_from_fn(
uri: Uri,
peer: Address,
cx: &mut HttpContext,
req: Incoming,
req: BodyIncoming,
next: Next,
) -> Response {
tracing::info!("Before {peer} request {uri}");
Expand Down
4 changes: 2 additions & 2 deletions volo-http/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use std::convert::Infallible;

pub use bytes::Bytes;
pub use hyper::{
body::Incoming,
body::Incoming as BodyIncoming,
http::{Extensions, HeaderMap, HeaderName, HeaderValue, Method, StatusCode, Uri, Version},
};
pub use volo::net::Address;
Expand All @@ -29,4 +29,4 @@ pub use crate::{
server::Server,
};

pub type DynService = motore::BoxCloneService<HttpContext, Incoming, Response, Infallible>;
pub type DynService = motore::BoxCloneService<HttpContext, BodyIncoming, Response, Infallible>;

0 comments on commit c4cc724

Please sign in to comment.