idempotency.h 1.0 KB

12345678910111213141516171819202122232425262728
  1. // Copyright (c) 2012 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef NET_BASE_IDEMPOTENCY_H_
  5. #define NET_BASE_IDEMPOTENCY_H_
  6. namespace net {
  7. // Idempotency of the request, which determines that if it is safe to enable
  8. // 0-RTT for the request. By default, 0-RTT is only enabled for safe
  9. // HTTP methods, i.e., GET, HEAD, OPTIONS, and TRACE. For other methods,
  10. // enabling 0-RTT may cause security issues since a network observer can replay
  11. // the request. If the request has any side effects, those effects can happen
  12. // multiple times. It is only safe to enable the 0-RTT if it is known that
  13. // the request is idempotent.
  14. // A Java counterpart will be generated for this enum.
  15. // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.net
  16. // GENERATED_JAVA_CLASS_NAME_OVERRIDE: Idempotency
  17. enum Idempotency {
  18. DEFAULT_IDEMPOTENCY = 0,
  19. IDEMPOTENT = 1,
  20. NOT_IDEMPOTENT = 2,
  21. };
  22. } // namespace net
  23. #endif // NET_BASE_IDEMPOTENCY_H_