Enum Class RequestTargetForm

java.lang.Object
java.lang.Enum<RequestTargetForm>
cool.scx.http.x.http1.request_line.RequestTargetForm
All Implemented Interfaces:
Serializable, Comparable<RequestTargetForm>, Constable

public enum RequestTargetForm extends Enum<RequestTargetForm>
  • Enum Constant Details

    • ORIGIN_FORM

      public static final RequestTargetForm ORIGIN_FORM

      例: GET /index.html?foo=1 HTTP/1.1

      用于大多数客户端请求

    • ABSOLUTE_FORM

      public static final RequestTargetForm ABSOLUTE_FORM

      例: GET http://example.com/index.html HTTP/1.1

      通过 HTTP代理 发出请求时使用

    • AUTHORITY_FORM

      public static final RequestTargetForm AUTHORITY_FORM

      例: CONNECT example.com:443 HTTP/1.1

      仅与 CONNECT 方法一起使用

    • ASTERISK_FORM

      public static final RequestTargetForm ASTERISK_FORM

      例: OPTIONS * HTTP/1.1

      仅与 OPTIONS 方法一起使用, 针对整个服务器

  • Method Details

    • values

      public static RequestTargetForm[] 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 RequestTargetForm 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