Skip to main content

handle_request

Function handle_request 

Source
pub async fn handle_request(req: Request, state: Arc<SharedState>) -> String
Expand description

Handle a parsed request and return a JSON response string.

Takes ownership of the Request and Arc to avoid holding references across await points, which would prevent the future from being Send (required by tokio::spawn).

Public so the REST API module can dispatch requests through the same handler.