Skip to content

How to create multiple idependent route #192

Answered by sunli829
azzamsa asked this question in Q&A
Discussion options

You must be logged in to vote
#[handler]
pub async fn risetai(
   ctx: Data<&Arc<ServerContext>>,  //   <<<<<  & reference is required
   Path(path): Path<String>,
   body: Json<Value>,
   headers: &HeaderMap,
) -> String {
   ctx.other_service.route(path, body, headers).await
}

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@azzamsa
Comment options

Answer selected by azzamsa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants