Enum Class HttpResponseMode

java.lang.Object
java.lang.Enum<HttpResponseMode>
io.github.easy4j.opencode.HttpResponseMode
All Implemented Interfaces:
Serializable, Comparable<HttpResponseMode>, Constable

public enum HttpResponseMode extends Enum<HttpResponseMode>
HTTP 对话响应模式。
Since:
1.0.0
Author:
Loong Wan
  • Enum Constant Details

    • BLOCKING

      public static final HttpResponseMode BLOCKING
      等待响应体完整读取后再返回,适用于普通同步 REST 调用。
    • STREAM

      public static final HttpResponseMode STREAM
      保持响应连接并逐段消费数据,适用于 SSE 或其他流式响应。
    • AUTO

      public static final HttpResponseMode AUTO
      由具体 API 根据端点类型自动选择缓冲或流式模式。
  • Method Details

    • values

      public static HttpResponseMode[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static HttpResponseMode valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null