Function axum::routing::post_service
source · [−]pub fn post_service<S, ReqBody, ResBody>(
svc: S
) -> MethodRouter<ReqBody, S::Error> where
S: Service<Request<ReqBody>, Response = Response<ResBody>> + Clone + Send + 'static,
S::Future: Send + 'static,
ResBody: HttpBody<Data = Bytes> + Send + 'static,
ResBody::Error: Into<BoxError>,
Expand description
Route POST
requests to the given service.
See get_service
for an example.