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

Method json

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

Returns the JSON content of the response.

(&self, py: Python)

Source from the content-addressed store, hash-verified

115
116 /// Returns the JSON content of the response.
117 pub fn json(&self, py: Python) -> PyResult<Json> {
118 py.allow_threads(|| {
119 let resp = self.0.inner()?;
120 pyo3_async_runtimes::tokio::get_runtime()
121 .block_on(resp.json::<Json>())
122 .map_err(Error::Request)
123 .map_err(Into::into)
124 })
125 }
126
127 /// Returns the bytes content of the response.
128 pub fn bytes(&self, py: Python) -> PyResult<Py<PyAny>> {

Callers 15

mainFunction · 0.45
mainFunction · 0.45
test_authFunction · 0.45
test_bearer_authFunction · 0.45
test_basic_authFunction · 0.45
test_send_headersFunction · 0.45
test_send_cookiesFunction · 0.45
test_send_formFunction · 0.45
test_send_jsonFunction · 0.45
test_send_textFunction · 0.45
test_send_bytesFunction · 0.45

Calls 1

innerMethod · 0.80

Tested by 13

test_authFunction · 0.36
test_bearer_authFunction · 0.36
test_basic_authFunction · 0.36
test_send_headersFunction · 0.36
test_send_cookiesFunction · 0.36
test_send_formFunction · 0.36
test_send_jsonFunction · 0.36
test_send_textFunction · 0.36
test_send_bytesFunction · 0.36
test_set_cookieFunction · 0.36