MCPcopy Create free account
hub / github.com/TheRedDeveloper/ply-engine / request

Function request

src/net/mod.rs:238–244  ·  view source on GitHub ↗

Get a handle to an existing HTTP request. Returns `None` if no such ID.

(id: &str)

Source from the content-addressed store, hash-verified

236
237/// Get a handle to an existing HTTP request. Returns `None` if no such ID.
238pub fn request(id: &str) -> Option<Request> {
239 let key = hash_id(id);
240 let mut mgr = NET_MANAGER.lock().unwrap();
241 let entry = mgr.http_requests.get_mut(&key)?;
242 entry.frames_not_accessed = 0;
243 Some(Request { id: key })
244}
245
246/// Connect a WebSocket. Idempotent: won't reconnect if already open.
247pub fn ws_connect(

Callers

nothing calls this directly

Calls 1

hash_idFunction · 0.85

Tested by

no test coverage detected