status.go 3.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. package httptest
  2. // HTTP status codes as registered with IANA.
  3. // See: http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
  4. // Raw Copy from the net/http std package in order to recude the import path of "net/http" for the users.
  5. //
  6. // These may or may not stay.
  7. const (
  8. StatusContinue = 100 // RFC 7231, 6.2.1
  9. StatusSwitchingProtocols = 101 // RFC 7231, 6.2.2
  10. StatusProcessing = 102 // RFC 2518, 10.1
  11. StatusOK = 200 // RFC 7231, 6.3.1
  12. StatusCreated = 201 // RFC 7231, 6.3.2
  13. StatusAccepted = 202 // RFC 7231, 6.3.3
  14. StatusNonAuthoritativeInfo = 203 // RFC 7231, 6.3.4
  15. StatusNoContent = 204 // RFC 7231, 6.3.5
  16. StatusResetContent = 205 // RFC 7231, 6.3.6
  17. StatusPartialContent = 206 // RFC 7233, 4.1
  18. StatusMultiStatus = 207 // RFC 4918, 11.1
  19. StatusAlreadyReported = 208 // RFC 5842, 7.1
  20. StatusIMUsed = 226 // RFC 3229, 10.4.1
  21. StatusMultipleChoices = 300 // RFC 7231, 6.4.1
  22. StatusMovedPermanently = 301 // RFC 7231, 6.4.2
  23. StatusFound = 302 // RFC 7231, 6.4.3
  24. StatusSeeOther = 303 // RFC 7231, 6.4.4
  25. StatusNotModified = 304 // RFC 7232, 4.1
  26. StatusUseProxy = 305 // RFC 7231, 6.4.5
  27. _ = 306 // RFC 7231, 6.4.6 (Unused)
  28. StatusTemporaryRedirect = 307 // RFC 7231, 6.4.7
  29. StatusPermanentRedirect = 308 // RFC 7538, 3
  30. StatusBadRequest = 400 // RFC 7231, 6.5.1
  31. StatusUnauthorized = 401 // RFC 7235, 3.1
  32. StatusPaymentRequired = 402 // RFC 7231, 6.5.2
  33. StatusForbidden = 403 // RFC 7231, 6.5.3
  34. StatusNotFound = 404 // RFC 7231, 6.5.4
  35. StatusMethodNotAllowed = 405 // RFC 7231, 6.5.5
  36. StatusNotAcceptable = 406 // RFC 7231, 6.5.6
  37. StatusProxyAuthRequired = 407 // RFC 7235, 3.2
  38. StatusRequestTimeout = 408 // RFC 7231, 6.5.7
  39. StatusConflict = 409 // RFC 7231, 6.5.8
  40. StatusGone = 410 // RFC 7231, 6.5.9
  41. StatusLengthRequired = 411 // RFC 7231, 6.5.10
  42. StatusPreconditionFailed = 412 // RFC 7232, 4.2
  43. StatusRequestEntityTooLarge = 413 // RFC 7231, 6.5.11
  44. StatusRequestURITooLong = 414 // RFC 7231, 6.5.12
  45. StatusUnsupportedMediaType = 415 // RFC 7231, 6.5.13
  46. StatusRequestedRangeNotSatisfiable = 416 // RFC 7233, 4.4
  47. StatusExpectationFailed = 417 // RFC 7231, 6.5.14
  48. StatusTeapot = 418 // RFC 7168, 2.3.3
  49. StatusUnprocessableEntity = 422 // RFC 4918, 11.2
  50. StatusLocked = 423 // RFC 4918, 11.3
  51. StatusFailedDependency = 424 // RFC 4918, 11.4
  52. StatusUpgradeRequired = 426 // RFC 7231, 6.5.15
  53. StatusPreconditionRequired = 428 // RFC 6585, 3
  54. StatusTooManyRequests = 429 // RFC 6585, 4
  55. StatusRequestHeaderFieldsTooLarge = 431 // RFC 6585, 5
  56. StatusUnavailableForLegalReasons = 451 // RFC 7725, 3
  57. StatusInternalServerError = 500 // RFC 7231, 6.6.1
  58. StatusNotImplemented = 501 // RFC 7231, 6.6.2
  59. StatusBadGateway = 502 // RFC 7231, 6.6.3
  60. StatusServiceUnavailable = 503 // RFC 7231, 6.6.4
  61. StatusGatewayTimeout = 504 // RFC 7231, 6.6.5
  62. StatusHTTPVersionNotSupported = 505 // RFC 7231, 6.6.6
  63. StatusVariantAlsoNegotiates = 506 // RFC 2295, 8.1
  64. StatusInsufficientStorage = 507 // RFC 4918, 11.5
  65. StatusLoopDetected = 508 // RFC 5842, 7.2
  66. StatusNotExtended = 510 // RFC 2774, 7
  67. StatusNetworkAuthenticationRequired = 511 // RFC 6585, 6
  68. )