Enum Class HttpMethod

java.lang.Object
java.lang.Enum<HttpMethod>
com.linecorp.armeria.common.HttpMethod
All Implemented Interfaces:
Serializable, Comparable<HttpMethod>, Constable

public enum HttpMethod extends Enum<HttpMethod>
HTTP request method.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
     

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Special HTTP method that is not defined in HTTP/1.1.
    Special HTTP method that is not defined in HTTP/1.1.
    Special HTTP method that is not defined in HTTP/1.1.
    Special HTTP method that is not defined in HTTP/1.1.
    Special HTTP method that is not defined in HTTP/1.1.
    The CONNECT method which is used for a proxy that can dynamically switch to being a tunnel or for bootstrapping WebSockets with HTTP/2.
    Special HTTP method that is not defined in HTTP/1.1.
    The DELETE method which requests that the origin server delete the resource identified by the Request-URI.
    The GET method which means retrieve whatever information (in the form of an entity) is identified by the Request-URI.
    The HEAD method which is identical to GET except that the server MUST NOT return a message-body in the response.
    Special HTTP method that is not defined in HTTP/1.1.
    Special HTTP method that is not defined in HTTP/1.1.
    Special HTTP method that is not defined in HTTP/1.1.
    Special HTTP method that is not defined in HTTP/1.1.
    Special HTTP method that is not defined in HTTP/1.1.
    Special HTTP method that is not defined in HTTP/1.1.
    Special HTTP method that is not defined in HTTP/1.1.
    Special HTTP method that is not defined in HTTP/1.1.
    Special HTTP method that is not defined in HTTP/1.1.
    Special HTTP method that is not defined in HTTP/1.1.
    The OPTIONS method which represents a request for information about the communication options available on the request/response chain identified by the Request-URI.
    Special HTTP method that is not defined in HTTP/1.1.
    The PATCH method which requests that a set of changes described in the request entity be applied to the resource identified by the Request-URI.
    The POST method which is used to request that the origin server accept the entity enclosed in the request as a new subordinate of the resource identified by the Request-URI in the Request-Line.
    Special HTTP method that is not defined in HTTP/1.1.
    Special HTTP method that is not defined in HTTP/1.1.
    Special HTTP method that is not defined in HTTP/1.1.
    The PUT method which requests that the enclosed entity be stored under the supplied Request-URI.
    Special HTTP method that is not defined in HTTP/1.1.
    Special HTTP method that is not defined in HTTP/1.1.
    Special HTTP method that is not defined in HTTP/1.1.
    The TRACE method which is used to invoke a remote, application-layer loop-back of the request message.
    Special HTTP method that is not defined in HTTP/1.1.
    Special HTTP method that is not defined in HTTP/1.1.
    A special constant returned by RequestHeaderGetters.method() to signify that a request has a method not defined in this enum.
    Special HTTP method that is not defined in HTTP/1.1.
    Special HTTP method that is not defined in HTTP/1.1.
    Special HTTP method that is not defined in HTTP/1.1.
    Special HTTP method that is not defined in HTTP/1.1.
    Special HTTP method that is not defined in HTTP/1.1.
  • Method Summary

    Modifier and Type
    Method
    Description
    static Set<HttpMethod>
    Returns the idempotent HTTP methods.
    static boolean
    Returns whether the specified String is one of the supported method names.
    static Set<HttpMethod>
    Returns all HttpMethods except UNKNOWN.
    static Set<HttpMethod>
    Returns the safe HTTP methods.
    static @Nullable HttpMethod
    tryParse(@Nullable String method)
    Parses the specified String into an HttpMethod.
    static HttpMethod
    Returns the enum constant of this class with the specified name.
    static HttpMethod[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • ACL

      public static final HttpMethod ACL
      Special HTTP method that is not defined in HTTP/1.1.
    • BASELINE_CONTROL

      public static final HttpMethod BASELINE_CONTROL
      Special HTTP method that is not defined in HTTP/1.1.
    • BIND

      public static final HttpMethod BIND
      Special HTTP method that is not defined in HTTP/1.1.
    • CHECKIN

      public static final HttpMethod CHECKIN
      Special HTTP method that is not defined in HTTP/1.1.
    • CHECKOUT

      public static final HttpMethod CHECKOUT
      Special HTTP method that is not defined in HTTP/1.1.
    • CONNECT

      public static final HttpMethod CONNECT
      The CONNECT method which is used for a proxy that can dynamically switch to being a tunnel or for bootstrapping WebSockets with HTTP/2. Note that Armeria handles a CONNECT request only for bootstrapping WebSockets.
    • COPY

      public static final HttpMethod COPY
      Special HTTP method that is not defined in HTTP/1.1.
    • DELETE

      public static final HttpMethod DELETE
      The DELETE method which requests that the origin server delete the resource identified by the Request-URI.
    • GET

      public static final HttpMethod GET
      The GET method which means retrieve whatever information (in the form of an entity) is identified by the Request-URI. If the Request-URI refers to a data-producing process, it is the produced data which shall be returned as the entity in the response and not the source text of the process, unless that text happens to be the output of the process.
    • LABEL

      public static final HttpMethod LABEL
      Special HTTP method that is not defined in HTTP/1.1.
    • LOCK

      public static final HttpMethod LOCK
      Special HTTP method that is not defined in HTTP/1.1.
    • MERGE

      public static final HttpMethod MERGE
      Special HTTP method that is not defined in HTTP/1.1.
    • MKACTIVITY

      public static final HttpMethod MKACTIVITY
      Special HTTP method that is not defined in HTTP/1.1.
    • MKCALENDAR

      public static final HttpMethod MKCALENDAR
      Special HTTP method that is not defined in HTTP/1.1.
    • MKCOL

      public static final HttpMethod MKCOL
      Special HTTP method that is not defined in HTTP/1.1.
    • MKREDIRECTREF

      public static final HttpMethod MKREDIRECTREF
      Special HTTP method that is not defined in HTTP/1.1.
    • MKWORKSPACE

      public static final HttpMethod MKWORKSPACE
      Special HTTP method that is not defined in HTTP/1.1.
    • MOVE

      public static final HttpMethod MOVE
      Special HTTP method that is not defined in HTTP/1.1.
    • OPTIONS

      public static final HttpMethod OPTIONS
      The OPTIONS method which represents a request for information about the communication options available on the request/response chain identified by the Request-URI. This method allows the client to determine the options and/or requirements associated with a resource, or the capabilities of a server, without implying a resource action or initiating a resource retrieval.
    • ORDERPATCH

      public static final HttpMethod ORDERPATCH
      Special HTTP method that is not defined in HTTP/1.1.
    • PATCH

      public static final HttpMethod PATCH
      The PATCH method which requests that a set of changes described in the request entity be applied to the resource identified by the Request-URI.
    • POST

      public static final HttpMethod POST
      The POST method which is used to request that the origin server accept the entity enclosed in the request as a new subordinate of the resource identified by the Request-URI in the Request-Line.
    • PRI

      public static final HttpMethod PRI
      Special HTTP method that is not defined in HTTP/1.1.
    • PROPFIND

      public static final HttpMethod PROPFIND
      Special HTTP method that is not defined in HTTP/1.1.
    • PROPPATCH

      public static final HttpMethod PROPPATCH
      Special HTTP method that is not defined in HTTP/1.1.
    • PUT

      public static final HttpMethod PUT
      The PUT method which requests that the enclosed entity be stored under the supplied Request-URI.
    • REBIND

      public static final HttpMethod REBIND
      Special HTTP method that is not defined in HTTP/1.1.
    • REPORT

      public static final HttpMethod REPORT
      Special HTTP method that is not defined in HTTP/1.1.
    • TRACE

      public static final HttpMethod TRACE
      The TRACE method which is used to invoke a remote, application-layer loop-back of the request message.
    • UNBIND

      public static final HttpMethod UNBIND
      Special HTTP method that is not defined in HTTP/1.1.
    • UNCHECKOUT

      public static final HttpMethod UNCHECKOUT
      Special HTTP method that is not defined in HTTP/1.1.
    • UNLOCK

      public static final HttpMethod UNLOCK
      Special HTTP method that is not defined in HTTP/1.1.
    • UPDATE

      public static final HttpMethod UPDATE
      Special HTTP method that is not defined in HTTP/1.1.
    • UPDATEREDIRECTREF

      public static final HttpMethod UPDATEREDIRECTREF
      Special HTTP method that is not defined in HTTP/1.1.
    • VERSION_CONTROL

      public static final HttpMethod VERSION_CONTROL
      Special HTTP method that is not defined in HTTP/1.1.
    • UNKNOWN

      public static final HttpMethod UNKNOWN
      A special constant returned by RequestHeaderGetters.method() to signify that a request has a method not defined in this enum.
  • Method Details

    • values

      public static HttpMethod[] 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 HttpMethod 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
    • isSupported

      public static boolean isSupported(String value)
      Returns whether the specified String is one of the supported method names.
      Returns:
      true if supported. false otherwise.
    • idempotentMethods

      public static Set<HttpMethod> idempotentMethods()
      Returns the idempotent HTTP methods.
    • safeMethods

      public static Set<HttpMethod> safeMethods()
      Returns the safe HTTP methods.
    • knownMethods

      public static Set<HttpMethod> knownMethods()
      Returns all HttpMethods except UNKNOWN.
    • tryParse

      @Nullable public static @Nullable HttpMethod tryParse(@Nullable @Nullable String method)
      Parses the specified String into an HttpMethod. This method will return the same HttpMethod instance for equal values of method. Note that this method will not treat "UNKNOWN" as a valid value and thus will return null when "UNKNOWN" is given.
      Returns:
      null if there is no such HttpMethod available