(&self, py: Python)
| 397 | /// Returns the user agent of the client. |
| 398 | #[getter] |
| 399 | pub fn user_agent(&self, py: Python) -> Option<String> { |
| 400 | py.allow_threads(|| { |
| 401 | self.0 |
| 402 | .user_agent() |
| 403 | .and_then(|hv| hv.to_str().map(ToString::to_string).ok()) |
| 404 | }) |
| 405 | } |
| 406 | |
| 407 | /// Returns the headers of the client. |
| 408 | #[getter] |