MCPcopy Create free account
hub / github.com/InfinitiBit/graphbit / from_url

Method from_url

guardrail_ffi/src/lib.rs:121–130  ·  view source on GitHub ↗

Load from URL (blocking GET).

(url: &str)

Source from the content-addressed store, hash-verified

119
120 /// Load from URL (blocking GET).
121 pub fn from_url(url: &str) -> Result<Self, String> {
122 let client = reqwest::blocking::Client::new();
123 let json = client
124 .get(url)
125 .send()
126 .map_err(|e| e.to_string())?
127 .text()
128 .map_err(|e| e.to_string())?;
129 Self::new(&json)
130 }
131
132 /// Default inactive config.
133 pub fn default_config() -> Self {

Callers

nothing calls this directly

Calls 2

to_stringMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected