MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / http_activity_for_method

Function http_activity_for_method

crates/openshell-server/src/service_routing.rs:780–793  ·  view source on GitHub ↗
(method: &Method)

Source from the content-addressed store, hash-verified

778}
779
780fn http_activity_for_method(method: &Method) -> ActivityId {
781 match method.as_str() {
782 "CONNECT" => ActivityId::Open,
783 "DELETE" => ActivityId::Close,
784 "GET" => ActivityId::Reset,
785 "HEAD" => ActivityId::Fail,
786 "OPTIONS" => ActivityId::Refuse,
787 "POST" => ActivityId::Traffic,
788 "PUT" => ActivityId::Listen,
789 "TRACE" => ActivityId::Trace,
790 "PATCH" => ActivityId::Patch,
791 _ => ActivityId::Other,
792 }
793}
794
795#[cfg(test)]
796mod tests {

Callers 1

Calls 1

as_strMethod · 0.45

Tested by

no test coverage detected