MCPcopy Create free account
hub / github.com/clockworklabs/SpacetimeDB / ToWireMethod

Method ToWireMethod

crates/bindings-csharp/Runtime/Http.cs:389–405  ·  view source on GitHub ↗
(HttpMethod method)

Source from the content-addressed store, hash-verified

387 }
388
389 private static HttpMethodWire ToWireMethod(HttpMethod method)
390 {
391 var m = method.Value;
392 return m switch
393 {
394 "GET" => new HttpMethodWire.Get(default),
395 "HEAD" => new HttpMethodWire.Head(default),
396 "POST" => new HttpMethodWire.Post(default),
397 "PUT" => new HttpMethodWire.Put(default),
398 "DELETE" => new HttpMethodWire.Delete(default),
399 "CONNECT" => new HttpMethodWire.Connect(default),
400 "OPTIONS" => new HttpMethodWire.Options(default),
401 "TRACE" => new HttpMethodWire.Trace(default),
402 "PATCH" => new HttpMethodWire.Patch(default),
403 _ => new HttpMethodWire.Extension(m),
404 };
405 }
406
407 private static HttpVersionWire ToWireVersion(HttpVersion version) =>
408 version switch

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected