Team Fortress 2 Source Code as on 22/4/2020
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.

96 lines
3.5 KiB

  1. //====== Copyright � 1996-2010, Valve Corporation, All rights reserved. =======
  2. //
  3. // Purpose: HTTP related enums, stuff that is shared by both clients and servers, and our
  4. // UI projects goes here.
  5. //
  6. //=============================================================================
  7. #ifndef STEAMHTTPENUMS_H
  8. #define STEAMHTTPENUMS_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. // HTTP related types
  13. // This enum is used in client API methods, do not re-number existing values.
  14. enum EHTTPMethod
  15. {
  16. k_EHTTPMethodInvalid = 0,
  17. k_EHTTPMethodGET,
  18. k_EHTTPMethodHEAD,
  19. k_EHTTPMethodPOST,
  20. k_EHTTPMethodPUT,
  21. k_EHTTPMethodDELETE,
  22. k_EHTTPMethodOPTIONS,
  23. // The remaining HTTP methods are not yet supported, per rfc2616 section 5.1.1 only GET and HEAD are required for
  24. // a compliant general purpose server. We'll likely add more as we find uses for them.
  25. // k_EHTTPMethodTRACE,
  26. // k_EHTTPMethodCONNECT
  27. };
  28. // HTTP Status codes that the server can send in response to a request, see rfc2616 section 10.3 for descriptions
  29. // of each of these.
  30. enum EHTTPStatusCode
  31. {
  32. // Invalid status code (this isn't defined in HTTP, used to indicate unset in our code)
  33. k_EHTTPStatusCodeInvalid = 0,
  34. // Informational codes
  35. k_EHTTPStatusCode100Continue = 100,
  36. k_EHTTPStatusCode101SwitchingProtocols = 101,
  37. // Success codes
  38. k_EHTTPStatusCode200OK = 200,
  39. k_EHTTPStatusCode201Created = 201,
  40. k_EHTTPStatusCode202Accepted = 202,
  41. k_EHTTPStatusCode203NonAuthoritative = 203,
  42. k_EHTTPStatusCode204NoContent = 204,
  43. k_EHTTPStatusCode205ResetContent = 205,
  44. k_EHTTPStatusCode206PartialContent = 206,
  45. // Redirection codes
  46. k_EHTTPStatusCode300MultipleChoices = 300,
  47. k_EHTTPStatusCode301MovedPermanently = 301,
  48. k_EHTTPStatusCode302Found = 302,
  49. k_EHTTPStatusCode303SeeOther = 303,
  50. k_EHTTPStatusCode304NotModified = 304,
  51. k_EHTTPStatusCode305UseProxy = 305,
  52. //k_EHTTPStatusCode306Unused = 306, (used in old HTTP spec, now unused in 1.1)
  53. k_EHTTPStatusCode307TemporaryRedirect = 307,
  54. // Error codes
  55. k_EHTTPStatusCode400BadRequest = 400,
  56. k_EHTTPStatusCode401Unauthorized = 401, // You probably want 403 or something else. 401 implies you're sending a WWW-Authenticate header and the client can sent an Authorization header in response.
  57. k_EHTTPStatusCode402PaymentRequired = 402, // This is reserved for future HTTP specs, not really supported by clients
  58. k_EHTTPStatusCode403Forbidden = 403,
  59. k_EHTTPStatusCode404NotFound = 404,
  60. k_EHTTPStatusCode405MethodNotAllowed = 405,
  61. k_EHTTPStatusCode406NotAcceptable = 406,
  62. k_EHTTPStatusCode407ProxyAuthRequired = 407,
  63. k_EHTTPStatusCode408RequestTimeout = 408,
  64. k_EHTTPStatusCode409Conflict = 409,
  65. k_EHTTPStatusCode410Gone = 410,
  66. k_EHTTPStatusCode411LengthRequired = 411,
  67. k_EHTTPStatusCode412PreconditionFailed = 412,
  68. k_EHTTPStatusCode413RequestEntityTooLarge = 413,
  69. k_EHTTPStatusCode414RequestURITooLong = 414,
  70. k_EHTTPStatusCode415UnsupportedMediaType = 415,
  71. k_EHTTPStatusCode416RequestedRangeNotSatisfiable = 416,
  72. k_EHTTPStatusCode417ExpectationFailed = 417,
  73. k_EHTTPStatusCode4xxUnknown = 418, // 418 is reserved, so we'll use it to mean unknown
  74. k_EHTTPStatusCode429TooManyRequests = 429,
  75. // Server error codes
  76. k_EHTTPStatusCode500InternalServerError = 500,
  77. k_EHTTPStatusCode501NotImplemented = 501,
  78. k_EHTTPStatusCode502BadGateway = 502,
  79. k_EHTTPStatusCode503ServiceUnavailable = 503,
  80. k_EHTTPStatusCode504GatewayTimeout = 504,
  81. k_EHTTPStatusCode505HTTPVersionNotSupported = 505,
  82. k_EHTTPStatusCode5xxUnknown = 599,
  83. };
  84. #endif // STEAMHTTPENUMS_H