github.com/alimy/mir/v4@v4.1.0/method.go (about)

     1  // Copyright 2019 Michael Li <alimy@gility.net>. All rights reserved.
     2  // Use of this source code is governed by Apache License 2.0 that
     3  // can be found in the LICENSE file.
     4  
     5  package mir
     6  
     7  import "net/http"
     8  
     9  // Common HTTP methods.
    10  const (
    11  	MethodGet     = http.MethodGet
    12  	MethodHead    = http.MethodHead
    13  	MethodPost    = http.MethodPost
    14  	MethodPut     = http.MethodPut
    15  	MethodPatch   = http.MethodPatch
    16  	MethodDelete  = http.MethodDelete
    17  	MethodConnect = http.MethodConnect
    18  	MethodOptions = http.MethodOptions
    19  	MethodTrace   = http.MethodTrace
    20  
    21  	// MethodAny indicate all method above used engine register routes
    22  	MethodAny = "ANY"
    23  )
    24  
    25  // HttpMethods http method list
    26  var HttpMethods = []string{
    27  	http.MethodGet,
    28  	http.MethodHead,
    29  	http.MethodPost,
    30  	http.MethodPut,
    31  	http.MethodPatch,
    32  	http.MethodDelete,
    33  	http.MethodConnect,
    34  	http.MethodOptions,
    35  	http.MethodTrace,
    36  }