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

Method request

perro_source/api_modules/perro_networking/src/http.rs:339–360  ·  view source on GitHub ↗
(&mut self, request: HttpRequest)

Source from the content-addressed store, hash-verified

337 kind,
338 message: message.into(),
339 }
340 }
341
342 fn into_http_error(self) -> HttpError {
343 let kind = match self.kind {
344 HttpSubmitErrorKind::QueueClosed => HttpErrorKind::QueueClosed,
345 HttpSubmitErrorKind::InvalidRequest | HttpSubmitErrorKind::QueueFull => {
346 HttpErrorKind::Send
347 }
348 };
349 HttpError::new(self.id, self.url, kind, self.message)
350 }
351}
352
353impl fmt::Display for HttpSubmitError {
354 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
355 write!(f, "{:?} {}: {}", self.kind, self.url, self.message)
356 }
357}
358
359impl std::error::Error for HttpSubmitError {}
360
361#[derive(Clone, Debug, PartialEq, Eq)]
362pub enum HttpEvent {
363 Completed(HttpResponse),

Callers 5

getMethod · 0.80
post_variantMethod · 0.80
put_variantMethod · 0.80
patch_variantMethod · 0.80
post_bytesMethod · 0.80

Calls 4

next_http_idMethod · 0.80
cloneMethod · 0.80
sendMethod · 0.80
is_emptyMethod · 0.45

Tested by

no test coverage detected