You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

statuses.go 2.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. // Copyright 2015 go-swagger maintainers
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. package runtime
  15. // Statuses lists the most common HTTP status codes to default message
  16. // taken from https://httpstatuses.com/
  17. var Statuses = map[int]string{
  18. 100: "Continue",
  19. 101: "Switching Protocols",
  20. 102: "Processing",
  21. 103: "Checkpoint",
  22. 122: "URI too long",
  23. 200: "OK",
  24. 201: "Created",
  25. 202: "Accepted",
  26. 203: "Request Processed",
  27. 204: "No Content",
  28. 205: "Reset Content",
  29. 206: "Partial Content",
  30. 207: "Multi-Status",
  31. 208: "Already Reported",
  32. 226: "IM Used",
  33. 300: "Multiple Choices",
  34. 301: "Moved Permanently",
  35. 302: "Found",
  36. 303: "See Other",
  37. 304: "Not Modified",
  38. 305: "Use Proxy",
  39. 306: "Switch Proxy",
  40. 307: "Temporary Redirect",
  41. 308: "Permanent Redirect",
  42. 400: "Bad Request",
  43. 401: "Unauthorized",
  44. 402: "Payment Required",
  45. 403: "Forbidden",
  46. 404: "Not Found",
  47. 405: "Method Not Allowed",
  48. 406: "Not Acceptable",
  49. 407: "Proxy Authentication Required",
  50. 408: "Request Timeout",
  51. 409: "Conflict",
  52. 410: "Gone",
  53. 411: "Length Required",
  54. 412: "Precondition Failed",
  55. 413: "Request Entity Too Large",
  56. 414: "Request-URI Too Long",
  57. 415: "Unsupported Media Type",
  58. 416: "Request Range Not Satisfiable",
  59. 417: "Expectation Failed",
  60. 418: "I'm a teapot",
  61. 420: "Enhance Your Calm",
  62. 422: "Unprocessable Entity",
  63. 423: "Locked",
  64. 424: "Failed Dependency",
  65. 426: "Upgrade Required",
  66. 428: "Precondition Required",
  67. 429: "Too Many Requests",
  68. 431: "Request Header Fields Too Large",
  69. 444: "No Response",
  70. 449: "Retry With",
  71. 450: "Blocked by Windows Parental Controls",
  72. 451: "Wrong Exchange Server",
  73. 499: "Client Closed Request",
  74. 500: "Internal Server Error",
  75. 501: "Not Implemented",
  76. 502: "Bad Gateway",
  77. 503: "Service Unavailable",
  78. 504: "Gateway Timeout",
  79. 505: "HTTP Version Not Supported",
  80. 506: "Variant Also Negotiates",
  81. 507: "Insufficient Storage",
  82. 508: "Loop Detected",
  83. 509: "Bandwidth Limit Exceeded",
  84. 510: "Not Extended",
  85. 511: "Network Authentication Required",
  86. 598: "Network read timeout error",
  87. 599: "Network connect timeout error",
  88. }