method.go 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. package ajp13
  2. // HTTPMethod denotes the HTTP method used
  3. type HTTPMethod uint8
  4. const (
  5. Options = HTTPMethod(iota + 1)
  6. Get = HTTPMethod(iota + 1)
  7. Head = HTTPMethod(iota + 1)
  8. Post = HTTPMethod(iota + 1)
  9. Put = HTTPMethod(iota + 1)
  10. Delete = HTTPMethod(iota + 1)
  11. Trace = HTTPMethod(iota + 1)
  12. PropFind = HTTPMethod(iota + 1)
  13. PropPatch = HTTPMethod(iota + 1)
  14. MkCol = HTTPMethod(iota + 1)
  15. Copy = HTTPMethod(iota + 1)
  16. Move = HTTPMethod(iota + 1)
  17. Lock = HTTPMethod(iota + 1)
  18. Unlock = HTTPMethod(iota + 1)
  19. Acl = HTTPMethod(iota + 1)
  20. Report = HTTPMethod(iota + 1)
  21. VersionControl = HTTPMethod(iota + 1)
  22. CheckIn = HTTPMethod(iota + 1)
  23. CheckOut = HTTPMethod(iota + 1)
  24. UnCheckOut = HTTPMethod(iota + 1)
  25. Search = HTTPMethod(iota + 1)
  26. MkWorkspace = HTTPMethod(iota + 1)
  27. Update = HTTPMethod(iota + 1)
  28. Label = HTTPMethod(iota + 1)
  29. Merge = HTTPMethod(iota + 1)
  30. BaselineControl = HTTPMethod(iota + 1)
  31. MkActivity = HTTPMethod(iota + 1)
  32. )
  33. func (method HTTPMethod) String() string {
  34. switch method {
  35. case Options:
  36. return "OPTIONS"
  37. case Get:
  38. return "GET"
  39. case Head:
  40. return "HEAD"
  41. case Post:
  42. return "POST"
  43. case Put:
  44. return "PUT"
  45. case Delete:
  46. return "DELETE"
  47. case Trace:
  48. return "TRACE"
  49. case PropFind:
  50. return "PROPFIND"
  51. case PropPatch:
  52. return "PROPPATCH"
  53. case MkCol:
  54. return "MKCOL"
  55. case Copy:
  56. return "COPY"
  57. case Move:
  58. return "MOVE"
  59. case Lock:
  60. return "LOCK"
  61. case Unlock:
  62. return "UNLOCK"
  63. case Acl:
  64. return "ACL"
  65. case Report:
  66. return "REPORT"
  67. case VersionControl:
  68. return "VERSIONCONTROL"
  69. case CheckIn:
  70. return "CHECKIN"
  71. case CheckOut:
  72. return "CHECKOUT"
  73. case UnCheckOut:
  74. return "UNCHECKOUT"
  75. case Search:
  76. return "SEARCH"
  77. case MkWorkspace:
  78. return "MKWORKSPACE"
  79. case Update:
  80. return "UPDATE"
  81. case Label:
  82. return "LABEL"
  83. case Merge:
  84. return "MERGE"
  85. case BaselineControl:
  86. return "BASELINECONTROL"
  87. case MkActivity:
  88. return "MKACTIVITY"
  89. }
  90. return "UNKNOWN"
  91. }