1
0

Http.php 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <?php
  2. /**
  3. * @copyright Copyright (c) 2016, ownCloud, Inc.
  4. *
  5. * @author Morris Jobke <hey@morrisjobke.de>
  6. * @author Thomas Müller <thomas.mueller@tmit.eu>
  7. * @author Thomas Tanghus <thomas@tanghus.net>
  8. *
  9. * @license AGPL-3.0
  10. *
  11. * This code is free software: you can redistribute it and/or modify
  12. * it under the terms of the GNU Affero General Public License, version 3,
  13. * as published by the Free Software Foundation.
  14. *
  15. * This program is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. * GNU Affero General Public License for more details.
  19. *
  20. * You should have received a copy of the GNU Affero General Public License, version 3,
  21. * along with this program. If not, see <http://www.gnu.org/licenses/>
  22. *
  23. */
  24. /**
  25. * Public interface of ownCloud for apps to use.
  26. * AppFramework\HTTP class
  27. */
  28. namespace OCP\AppFramework;
  29. /**
  30. * Base class which contains constants for HTTP status codes
  31. * @since 6.0.0
  32. */
  33. class Http {
  34. const STATUS_CONTINUE = 100;
  35. const STATUS_SWITCHING_PROTOCOLS = 101;
  36. const STATUS_PROCESSING = 102;
  37. const STATUS_OK = 200;
  38. const STATUS_CREATED = 201;
  39. const STATUS_ACCEPTED = 202;
  40. const STATUS_NON_AUTHORATIVE_INFORMATION = 203;
  41. const STATUS_NO_CONTENT = 204;
  42. const STATUS_RESET_CONTENT = 205;
  43. const STATUS_PARTIAL_CONTENT = 206;
  44. const STATUS_MULTI_STATUS = 207;
  45. const STATUS_ALREADY_REPORTED = 208;
  46. const STATUS_IM_USED = 226;
  47. const STATUS_MULTIPLE_CHOICES = 300;
  48. const STATUS_MOVED_PERMANENTLY = 301;
  49. const STATUS_FOUND = 302;
  50. const STATUS_SEE_OTHER = 303;
  51. const STATUS_NOT_MODIFIED = 304;
  52. const STATUS_USE_PROXY = 305;
  53. const STATUS_RESERVED = 306;
  54. const STATUS_TEMPORARY_REDIRECT = 307;
  55. const STATUS_BAD_REQUEST = 400;
  56. const STATUS_UNAUTHORIZED = 401;
  57. const STATUS_PAYMENT_REQUIRED = 402;
  58. const STATUS_FORBIDDEN = 403;
  59. const STATUS_NOT_FOUND = 404;
  60. const STATUS_METHOD_NOT_ALLOWED = 405;
  61. const STATUS_NOT_ACCEPTABLE = 406;
  62. const STATUS_PROXY_AUTHENTICATION_REQUIRED = 407;
  63. const STATUS_REQUEST_TIMEOUT = 408;
  64. const STATUS_CONFLICT = 409;
  65. const STATUS_GONE = 410;
  66. const STATUS_LENGTH_REQUIRED = 411;
  67. const STATUS_PRECONDITION_FAILED = 412;
  68. const STATUS_REQUEST_ENTITY_TOO_LARGE = 413;
  69. const STATUS_REQUEST_URI_TOO_LONG = 414;
  70. const STATUS_UNSUPPORTED_MEDIA_TYPE = 415;
  71. const STATUS_REQUEST_RANGE_NOT_SATISFIABLE = 416;
  72. const STATUS_EXPECTATION_FAILED = 417;
  73. const STATUS_IM_A_TEAPOT = 418;
  74. const STATUS_UNPROCESSABLE_ENTITY = 422;
  75. const STATUS_LOCKED = 423;
  76. const STATUS_FAILED_DEPENDENCY = 424;
  77. const STATUS_UPGRADE_REQUIRED = 426;
  78. const STATUS_PRECONDITION_REQUIRED = 428;
  79. const STATUS_TOO_MANY_REQUESTS = 429;
  80. const STATUS_REQUEST_HEADER_FIELDS_TOO_LARGE = 431;
  81. const STATUS_INTERNAL_SERVER_ERROR = 500;
  82. const STATUS_NOT_IMPLEMENTED = 501;
  83. const STATUS_BAD_GATEWAY = 502;
  84. const STATUS_SERVICE_UNAVAILABLE = 503;
  85. const STATUS_GATEWAY_TIMEOUT = 504;
  86. const STATUS_HTTP_VERSION_NOT_SUPPORTED = 505;
  87. const STATUS_VARIANT_ALSO_NEGOTIATES = 506;
  88. const STATUS_INSUFFICIENT_STORAGE = 507;
  89. const STATUS_LOOP_DETECTED = 508;
  90. const STATUS_BANDWIDTH_LIMIT_EXCEEDED = 509;
  91. const STATUS_NOT_EXTENDED = 510;
  92. const STATUS_NETWORK_AUTHENTICATION_REQUIRED = 511;
  93. }