Explorer

http.method-of-text

description
The method of a method name (other if it is not a standard one. The name is case-sensitive like HTTP)
type
Fn(text: String) -> @http.method
expression
fn(text$0) =>
  match $0 {
    "GET" =>
      #get<@http.method>,
    "HEAD" =>
      #head<@http.method>,
    "POST" =>
      #post<@http.method>,
    "PUT" =>
      #put<@http.method>,
    "DELETE" =>
      #delete<@http.method>,
    "CONNECT" =>
      #connect<@http.method>,
    "OPTIONS" =>
      #options<@http.method>,
    "TRACE" =>
      #trace<@http.method>,
    "PATCH" =>
      #patch<@http.method>,
    _ =>
      #other<@http.method>($0)
  }
visibility
public
http.method-of-text (project http, branch main, snapshot FuOge41aUHwwPZkx2JW6O-Emair6Jc-D5YsZf5cx6b0)
id: GP20dbFIc3J7lwWcypv2-tJRab-EuiKnGJ3zX1s9MKE
content hash: tERi3akC6UMeInkk6_usprXYGdHfiLtyv5s3Z7TW9PU