blob: 42b6895f43f9339d47f772c1b6f944b5b464d51c [file] [log] [blame]
Avi Drissman64595482022-09-14 20:52:291// Copyright 2012 The Chromium Authors
Yu Su2d738bb2020-10-30 02:23:552// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef NET_BASE_IDEMPOTENCY_H_
6#define NET_BASE_IDEMPOTENCY_H_
7
8namespace net {
9
10// Idempotency of the request, which determines that if it is safe to enable
11// 0-RTT for the request. By default, 0-RTT is only enabled for safe
12// HTTP methods, i.e., GET, HEAD, OPTIONS, and TRACE. For other methods,
13// enabling 0-RTT may cause security issues since a network observer can replay
14// the request. If the request has any side effects, those effects can happen
15// multiple times. It is only safe to enable the 0-RTT if it is known that
16// the request is idempotent.
Yu Su199523d42020-11-13 03:04:3717// A Java counterpart will be generated for this enum.
18// GENERATED_JAVA_ENUM_PACKAGE: org.chromium.net
19// GENERATED_JAVA_CLASS_NAME_OVERRIDE: Idempotency
Yu Su2d738bb2020-10-30 02:23:5520enum Idempotency {
21 DEFAULT_IDEMPOTENCY = 0,
22 IDEMPOTENT = 1,
23 NOT_IDEMPOTENT = 2,
24};
25
26} // namespace net
27
28#endif // NET_BASE_IDEMPOTENCY_H_