MCPcopy Index your code
hub / github.com/clearloop/leetcode-cli / headers

Method headers

src/plugins/leetcode.rs:22–30  ·  view source on GitHub ↗

Parse reqwest headers

(mut headers: HeaderMap, ts: Vec<(&str, &str)>)

Source from the content-addressed store, hash-verified

20impl LeetCode {
21 /// Parse reqwest headers
22 fn headers(mut headers: HeaderMap, ts: Vec<(&str, &str)>) -> Result<HeaderMap> {
23 for (k, v) in ts.into_iter() {
24 let name = HeaderName::from_str(k)?;
25 let value = HeaderValue::from_str(v)?;
26 headers.insert(name, value);
27 }
28
29 Ok(headers)
30 }
31
32 /// New LeetCode client
33 pub fn new() -> Result<LeetCode> {

Callers 1

sendMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected