MCPcopy Create free account
hub / github.com/0x676e67/wreq-python / text

Method text

src/client/blocking/response/http.rs:95–103  ·  view source on GitHub ↗

Returns the text content of the response.

(&self, py: Python)

Source from the content-addressed store, hash-verified

93
94 /// Returns the text content of the response.
95 pub fn text(&self, py: Python) -> PyResult<String> {
96 py.allow_threads(|| {
97 let resp = self.0.inner()?;
98 pyo3_async_runtimes::tokio::get_runtime()
99 .block_on(resp.text())
100 .map_err(Error::Request)
101 .map_err(Into::into)
102 })
103 }
104
105 /// Returns the text content of the response with a specific charset.
106 pub fn text_with_charset(&self, py: Python, encoding: PyBackedStr) -> PyResult<String> {

Callers

nothing calls this directly

Calls 1

innerMethod · 0.80

Tested by

no test coverage detected