Returns the text content of the response.
(&self, py: Python<'py>)
| 142 | |
| 143 | /// Returns the text content of the response. |
| 144 | pub fn text<'py>(&self, py: Python<'py>) -> PyResult<Bound<'py, PyAny>> { |
| 145 | let resp = self.inner()?; |
| 146 | future_into_py(py, async move { |
| 147 | resp.text() |
| 148 | .await |
| 149 | .map_err(Error::Request) |
| 150 | .map_err(Into::into) |
| 151 | }) |
| 152 | } |
| 153 | |
| 154 | /// Returns the text content of the response with a specific charset. |
| 155 | pub fn text_with_charset<'py>( |