(&mut self, request: http::Request<ReqBody>)
| 264 | } |
| 265 | |
| 266 | fn call(&mut self, request: http::Request<ReqBody>) -> Self::Future { |
| 267 | let uri = request.uri().path().to_string(); |
| 268 | let uri_parts: Vec<&str> = uri.split('/').collect(); |
| 269 | let future = self.inner.call(request); |
| 270 | let start = Instant::now(); |
| 271 | ApiLoggerFuture { |
| 272 | future, |
| 273 | start, |
| 274 | service: uri_parts.get(1).map(|v| v.to_string()).unwrap_or_default(), |
| 275 | method: uri_parts.get(2).map(|v| v.to_string()).unwrap_or_default(), |
| 276 | } |
| 277 | } |
| 278 | } |
| 279 | |
| 280 | #[pin_project] |