Http.php 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309
  1. <?php
  2. /**
  3. * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
  4. * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
  5. * SPDX-License-Identifier: AGPL-3.0-only
  6. */
  7. namespace OCP\AppFramework;
  8. /**
  9. * Base class which contains constants for HTTP status codes
  10. * @since 6.0.0
  11. */
  12. class Http {
  13. /**
  14. * @since 6.0.0
  15. */
  16. public const STATUS_CONTINUE = 100;
  17. /**
  18. * @since 6.0.0
  19. */
  20. public const STATUS_SWITCHING_PROTOCOLS = 101;
  21. /**
  22. * @since 6.0.0
  23. */
  24. public const STATUS_PROCESSING = 102;
  25. /**
  26. * @since 6.0.0
  27. */
  28. public const STATUS_OK = 200;
  29. /**
  30. * @since 6.0.0
  31. */
  32. public const STATUS_CREATED = 201;
  33. /**
  34. * @since 6.0.0
  35. */
  36. public const STATUS_ACCEPTED = 202;
  37. /**
  38. * @since 6.0.0
  39. */
  40. public const STATUS_NON_AUTHORATIVE_INFORMATION = 203;
  41. /**
  42. * @since 6.0.0
  43. */
  44. public const STATUS_NO_CONTENT = 204;
  45. /**
  46. * @since 6.0.0
  47. */
  48. public const STATUS_RESET_CONTENT = 205;
  49. /**
  50. * @since 6.0.0
  51. */
  52. public const STATUS_PARTIAL_CONTENT = 206;
  53. /**
  54. * @since 6.0.0
  55. */
  56. public const STATUS_MULTI_STATUS = 207;
  57. /**
  58. * @since 6.0.0
  59. */
  60. public const STATUS_ALREADY_REPORTED = 208;
  61. /**
  62. * @since 6.0.0
  63. */
  64. public const STATUS_IM_USED = 226;
  65. /**
  66. * @since 6.0.0
  67. */
  68. public const STATUS_MULTIPLE_CHOICES = 300;
  69. /**
  70. * @since 6.0.0
  71. */
  72. public const STATUS_MOVED_PERMANENTLY = 301;
  73. /**
  74. * @since 6.0.0
  75. */
  76. public const STATUS_FOUND = 302;
  77. /**
  78. * @since 6.0.0
  79. */
  80. public const STATUS_SEE_OTHER = 303;
  81. /**
  82. * @since 6.0.0
  83. */
  84. public const STATUS_NOT_MODIFIED = 304;
  85. /**
  86. * @since 6.0.0
  87. */
  88. public const STATUS_USE_PROXY = 305;
  89. /**
  90. * @since 6.0.0
  91. */
  92. public const STATUS_RESERVED = 306;
  93. /**
  94. * @since 6.0.0
  95. */
  96. public const STATUS_TEMPORARY_REDIRECT = 307;
  97. /**
  98. * @since 6.0.0
  99. */
  100. public const STATUS_BAD_REQUEST = 400;
  101. /**
  102. * @since 6.0.0
  103. */
  104. public const STATUS_UNAUTHORIZED = 401;
  105. /**
  106. * @since 6.0.0
  107. */
  108. public const STATUS_PAYMENT_REQUIRED = 402;
  109. /**
  110. * @since 6.0.0
  111. */
  112. public const STATUS_FORBIDDEN = 403;
  113. /**
  114. * @since 6.0.0
  115. */
  116. public const STATUS_NOT_FOUND = 404;
  117. /**
  118. * @since 6.0.0
  119. */
  120. public const STATUS_METHOD_NOT_ALLOWED = 405;
  121. /**
  122. * @since 6.0.0
  123. */
  124. public const STATUS_NOT_ACCEPTABLE = 406;
  125. /**
  126. * @since 6.0.0
  127. */
  128. public const STATUS_PROXY_AUTHENTICATION_REQUIRED = 407;
  129. /**
  130. * @since 6.0.0
  131. */
  132. public const STATUS_REQUEST_TIMEOUT = 408;
  133. /**
  134. * @since 6.0.0
  135. */
  136. public const STATUS_CONFLICT = 409;
  137. /**
  138. * @since 6.0.0
  139. */
  140. public const STATUS_GONE = 410;
  141. /**
  142. * @since 6.0.0
  143. */
  144. public const STATUS_LENGTH_REQUIRED = 411;
  145. /**
  146. * @since 6.0.0
  147. */
  148. public const STATUS_PRECONDITION_FAILED = 412;
  149. /**
  150. * @since 6.0.0
  151. */
  152. public const STATUS_REQUEST_ENTITY_TOO_LARGE = 413;
  153. /**
  154. * @since 6.0.0
  155. */
  156. public const STATUS_REQUEST_URI_TOO_LONG = 414;
  157. /**
  158. * @since 6.0.0
  159. */
  160. public const STATUS_UNSUPPORTED_MEDIA_TYPE = 415;
  161. /**
  162. * @since 6.0.0
  163. */
  164. public const STATUS_REQUEST_RANGE_NOT_SATISFIABLE = 416;
  165. /**
  166. * @since 6.0.0
  167. */
  168. public const STATUS_EXPECTATION_FAILED = 417;
  169. /**
  170. * @since 6.0.0
  171. */
  172. public const STATUS_IM_A_TEAPOT = 418;
  173. /**
  174. * @since 6.0.0
  175. */
  176. public const STATUS_UNPROCESSABLE_ENTITY = 422;
  177. /**
  178. * @since 6.0.0
  179. */
  180. public const STATUS_LOCKED = 423;
  181. /**
  182. * @since 6.0.0
  183. */
  184. public const STATUS_FAILED_DEPENDENCY = 424;
  185. /**
  186. * @since 6.0.0
  187. */
  188. public const STATUS_UPGRADE_REQUIRED = 426;
  189. /**
  190. * @since 6.0.0
  191. */
  192. public const STATUS_PRECONDITION_REQUIRED = 428;
  193. /**
  194. * @since 6.0.0
  195. */
  196. public const STATUS_TOO_MANY_REQUESTS = 429;
  197. /**
  198. * @since 6.0.0
  199. */
  200. public const STATUS_REQUEST_HEADER_FIELDS_TOO_LARGE = 431;
  201. /**
  202. * @since 6.0.0
  203. */
  204. public const STATUS_INTERNAL_SERVER_ERROR = 500;
  205. /**
  206. * @since 6.0.0
  207. */
  208. public const STATUS_NOT_IMPLEMENTED = 501;
  209. /**
  210. * @since 6.0.0
  211. */
  212. public const STATUS_BAD_GATEWAY = 502;
  213. /**
  214. * @since 6.0.0
  215. */
  216. public const STATUS_SERVICE_UNAVAILABLE = 503;
  217. /**
  218. * @since 6.0.0
  219. */
  220. public const STATUS_GATEWAY_TIMEOUT = 504;
  221. /**
  222. * @since 6.0.0
  223. */
  224. public const STATUS_HTTP_VERSION_NOT_SUPPORTED = 505;
  225. /**
  226. * @since 6.0.0
  227. */
  228. public const STATUS_VARIANT_ALSO_NEGOTIATES = 506;
  229. /**
  230. * @since 6.0.0
  231. */
  232. public const STATUS_INSUFFICIENT_STORAGE = 507;
  233. /**
  234. * @since 6.0.0
  235. */
  236. public const STATUS_LOOP_DETECTED = 508;
  237. /**
  238. * @since 6.0.0
  239. */
  240. public const STATUS_BANDWIDTH_LIMIT_EXCEEDED = 509;
  241. /**
  242. * @since 6.0.0
  243. */
  244. public const STATUS_NOT_EXTENDED = 510;
  245. /**
  246. * @since 6.0.0
  247. */
  248. public const STATUS_NETWORK_AUTHENTICATION_REQUIRED = 511;
  249. }