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

Method append

src/client/typing/header.rs:98–107  ·  view source on GitHub ↗
(&mut self, py: Python, key: PyBackedStr, value: PyBackedStr)

Source from the content-addressed store, hash-verified

96 /// Append a key-value pair to the header map.
97 #[pyo3(signature = (key, value))]
98 fn append(&mut self, py: Python, key: PyBackedStr, value: PyBackedStr) {
99 py.allow_threads(|| {
100 if let (Ok(name), Ok(value)) = (
101 HeaderName::from_bytes(key.as_bytes()),
102 HeaderValue::from_maybe_shared(value),
103 ) {
104 self.0.append(name, value);
105 }
106 })
107 }
108
109 /// Remove a key-value pair from the header map.
110 #[pyo3(signature = (key))]

Callers 9

test_append_and_get_allFunction · 0.95
test_len_and_keys_lenFunction · 0.95
test_items_and_iterFunction · 0.95
test_edge_casesFunction · 0.95
run_sync_testsFunction · 0.80
run_threaded_testsFunction · 0.80
run_async_testsFunction · 0.80
plot_benchmark_multiFunction · 0.80
updateMethod · 0.80

Calls

no outgoing calls

Tested by 4

test_append_and_get_allFunction · 0.76
test_len_and_keys_lenFunction · 0.76
test_items_and_iterFunction · 0.76
test_edge_casesFunction · 0.76