MCPcopy Create free account
hub / github.com/PerroEngine/Perro / as_str

Method as_str

perro_source/api_modules/perro_networking/src/http.rs:223–235  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

221 pub fn text(&self) -> HttpResult<String> {
222 String::from_utf8(self.body.clone()).map_err(|err| {
223 HttpError::new(
224 self.id,
225 self.url.clone(),
226 HttpErrorKind::Text,
227 err.to_string(),
228 )
229 })
230 }
231
232 pub fn variant(&self) -> HttpResult<Variant> {
233 let value: JsonValue = serde_json::from_slice(&self.body).map_err(|err| {
234 HttpError::new(
235 self.id,
236 self.url.clone(),
237 HttpErrorKind::Json,
238 err.to_string(),

Callers 3

headerMethod · 0.45
apply_headersFunction · 0.45
response_headersFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected