Counter Strike : Global Offensive Source Code
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.

97 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. k_EHTTPMethodPATCH,
  24. // The remaining HTTP methods are not yet supported, per rfc2616 section 5.1.1 only GET and HEAD are required for
  25. // a compliant general purpose server. We'll likely add more as we find uses for them.
  26. // k_EHTTPMethodTRACE,
  27. // k_EHTTPMethodCONNECT
  28. };
  29. // HTTP Status codes that the server can send in response to a request, see rfc2616 section 10.3 for descriptions
  30. // of each of these.
  31. enum EHTTPStatusCode
  32. {
  33. // Invalid status code (this isn't defined in HTTP, used to indicate unset in our code)
  34. k_EHTTPStatusCodeInvalid = 0,
  35. // Informational codes
  36. k_EHTTPStatusCode100Continue = 100,
  37. k_EHTTPStatusCode101SwitchingProtocols = 101,
  38. // Success codes
  39. k_EHTTPStatusCode200OK = 200,
  40. k_EHTTPStatusCode201Created = 201,
  41. k_EHTTPStatusCode202Accepted = 202,
  42. k_EHTTPStatusCode203NonAuthoritative = 203,
  43. k_EHTTPStatusCode204NoContent = 204,
  44. k_EHTTPStatusCode205ResetContent = 205,
  45. k_EHTTPStatusCode206PartialContent = 206,
  46. // Redirection codes
  47. k_EHTTPStatusCode300MultipleChoices = 300,
  48. k_EHTTPStatusCode301MovedPermanently = 301,
  49. k_EHTTPStatusCode302Found = 302,
  50. k_EHTTPStatusCode303SeeOther = 303,
  51. k_EHTTPStatusCode304NotModified = 304,
  52. k_EHTTPStatusCode305UseProxy = 305,
  53. //k_EHTTPStatusCode306Unused = 306, (used in old HTTP spec, now unused in 1.1)
  54. k_EHTTPStatusCode307TemporaryRedirect = 307,
  55. // Error codes
  56. k_EHTTPStatusCode400BadRequest = 400,
  57. 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.
  58. k_EHTTPStatusCode402PaymentRequired = 402, // This is reserved for future HTTP specs, not really supported by clients
  59. k_EHTTPStatusCode403Forbidden = 403,
  60. k_EHTTPStatusCode404NotFound = 404,
  61. k_EHTTPStatusCode405MethodNotAllowed = 405,
  62. k_EHTTPStatusCode406NotAcceptable = 406,
  63. k_EHTTPStatusCode407ProxyAuthRequired = 407,
  64. k_EHTTPStatusCode408RequestTimeout = 408,
  65. k_EHTTPStatusCode409Conflict = 409,
  66. k_EHTTPStatusCode410Gone = 410,
  67. k_EHTTPStatusCode411LengthRequired = 411,
  68. k_EHTTPStatusCode412PreconditionFailed = 412,
  69. k_EHTTPStatusCode413RequestEntityTooLarge = 413,
  70. k_EHTTPStatusCode414RequestURITooLong = 414,
  71. k_EHTTPStatusCode415UnsupportedMediaType = 415,
  72. k_EHTTPStatusCode416RequestedRangeNotSatisfiable = 416,
  73. k_EHTTPStatusCode417ExpectationFailed = 417,
  74. k_EHTTPStatusCode4xxUnknown = 418, // 418 is reserved, so we'll use it to mean unknown
  75. k_EHTTPStatusCode429TooManyRequests = 429,
  76. // Server error codes
  77. k_EHTTPStatusCode500InternalServerError = 500,
  78. k_EHTTPStatusCode501NotImplemented = 501,
  79. k_EHTTPStatusCode502BadGateway = 502,
  80. k_EHTTPStatusCode503ServiceUnavailable = 503,
  81. k_EHTTPStatusCode504GatewayTimeout = 504,
  82. k_EHTTPStatusCode505HTTPVersionNotSupported = 505,
  83. k_EHTTPStatusCode5xxUnknown = 599,
  84. };
  85. #endif // STEAMHTTPENUMS_H