Skip to main content

handle

Function handle 

Source
pub async fn handle<S, B>(state: &S, request: Request<B>) -> Response<Bytes>
where S: State, B: Body<Data = Bytes>, B::Error: Into<Box<dyn Error + Send + Sync>>,
Expand description

Answer a request to the REST API.

The path is the API’s own – /items, /rpc/f – with whatever prefix the host mounted it under already taken off. The body is read here, after the token has been checked, and no further than max_body_size.