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

Method json

src/client/async_impl/response/http.rs:170–178  ·  view source on GitHub ↗

Returns the JSON content of the response.

(&self, py: Python<'py>)

Source from the content-addressed store, hash-verified

168
169 /// Returns the JSON content of the response.
170 pub fn json<'py>(&self, py: Python<'py>) -> PyResult<Bound<'py, PyAny>> {
171 let resp = self.inner()?;
172 future_into_py(py, async move {
173 resp.json::<Json>()
174 .await
175 .map_err(Error::Request)
176 .map_err(Into::into)
177 })
178 }
179
180 /// Returns the bytes content of the response.
181 pub fn bytes<'py>(&self, py: Python<'py>) -> PyResult<Bound<'py, PyAny>> {

Callers

nothing calls this directly

Calls 1

innerMethod · 0.80

Tested by

no test coverage detected