diff --git a/content/en/docs/volo/volo-http/tutorials/response.md b/content/en/docs/volo/volo-http/tutorials/response.md index 4d404e7b314..b8652bac81e 100644 --- a/content/en/docs/volo/volo-http/tutorials/response.md +++ b/content/en/docs/volo/volo-http/tutorials/response.md @@ -45,8 +45,8 @@ In the framework, types such as `Form`, `Json`, etc. also implement `IntoRespons ```rust use volo_http::{ - json::Json, server::{ + extract::Json, route::{get, post, Router}, IntoResponse, }, diff --git a/content/en/docs/volo/volo-http/tutorials/route.md b/content/en/docs/volo/volo-http/tutorials/route.md index a40bd62255d..6dc030ea8fa 100644 --- a/content/en/docs/volo/volo-http/tutorials/route.md +++ b/content/en/docs/volo/volo-http/tutorials/route.md @@ -376,10 +376,10 @@ use std::convert::Infallible; use volo_http::{ context::ServerContext, - json::Json, request::ServerRequest, response::ServerResponse, server::{ + extract::Json, route::{post_service, Router}, IntoResponse, }, @@ -410,4 +410,4 @@ pub fn json_test_router() -> Router { } ``` -The final run is expected to be consistent with `json_get` and `json_post`. \ No newline at end of file +The final run is expected to be consistent with `json_get` and `json_post`. diff --git a/content/zh/docs/volo/volo-http/tutorials/response.md b/content/zh/docs/volo/volo-http/tutorials/response.md index f517f05eff3..85bd33d80d3 100644 --- a/content/zh/docs/volo/volo-http/tutorials/response.md +++ b/content/zh/docs/volo/volo-http/tutorials/response.md @@ -46,8 +46,8 @@ async fn teapot() -> StatusCode { StatusCode::IM_A_TEAPOT } ```rust use volo_http::{ - json::Json, server::{ + extract::Json, route::{get, post, Router}, IntoResponse, }, diff --git a/content/zh/docs/volo/volo-http/tutorials/route.md b/content/zh/docs/volo/volo-http/tutorials/route.md index 6fada2ca79a..589d1f60f96 100644 --- a/content/zh/docs/volo/volo-http/tutorials/route.md +++ b/content/zh/docs/volo/volo-http/tutorials/route.md @@ -372,10 +372,10 @@ use std::convert::Infallible; use volo_http::{ context::ServerContext, - json::Json, request::ServerRequest, response::ServerResponse, server::{ + extract::Json, route::{post_service, Router}, IntoResponse, }, @@ -406,4 +406,4 @@ pub fn json_test_router() -> Router { } ``` -最终运行的效果预期与 `json_get` 和 `json_post` 一致 \ No newline at end of file +最终运行的效果预期与 `json_get` 和 `json_post` 一致