Enum Class Http.Method

java.lang.Object
java.lang.Enum<Http.Method>
io.helidon.common.http.Http.Method
All Implemented Interfaces:
Http.RequestMethod, Serializable, Comparable<Http.Method>, Constable
Enclosing class:
Http

public static enum Http.Method extends Enum<Http.Method> implements Http.RequestMethod
Enumeration of all standard HTTP methods. It is extensible enumeration pattern.
See Also:
  • Nested Class Summary

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

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

    Enum Constants
    Enum Constant
    Description
    The DELETE method requests that the origin server delete the resource identified by the Request-URI.
    The GET method means retrieve whatever information (in the form of an entity) is identified by the Request-URI.
    The HEAD method is identical to GET except that the server MUST NOT return a message-body in the response.
    The OPTIONS method represents a request for information about the communication options available on the request/response chain identified by the Request-URI.
    The PATCH method as described in RFC 5789 is used to perform an update to an existing resource, where the request payload only has to contain the instructions on how to perform the update.
    The POST method is used to request that the origin server acceptedTypes the entity enclosed in the request as a new subordinate of the resource identified by the Request-URI in the Request-Line.
    The PUT method requests that the enclosed entity be stored under the supplied Request-URI.
    The TRACE method is used to invoke a remote, application-layer loop- back of the request message.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the enum constant of this class with the specified name.
    static Http.Method[]
    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

    Methods inherited from interface io.helidon.common.http.Http.RequestMethod

    name
  • Enum Constant Details

    • OPTIONS

      public static final Http.Method OPTIONS
      The OPTIONS method 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.
    • GET

      public static final Http.Method GET
      The GET method 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 tryProcess.
    • POST

      public static final Http.Method POST
      The POST method is used to request that the origin server acceptedTypes the entity enclosed in the request as a new subordinate of the resource identified by the Request-URI in the Request-Line. The actual function performed by the POST method is determined by the server and is usually dependent on the Request-URI. The posted entity is subordinate to that URI in the same way that a file is subordinate to a directory containing it, a news article is subordinate to a newsgroup to which it is posted, or a record is subordinate to a database.
    • PUT

      public static final Http.Method PUT
      The PUT method requests that the enclosed entity be stored under the supplied Request-URI. If the Request-URI refers to an already existing resource, the enclosed entity SHOULD be considered as a modified version of the one residing on the origin server. If the Request-URI does not point to an existing resource, and that URI is capable of being defined as a new resource by the requesting user agent, the origin server can create the resource with that URI. If a new resource is created, the origin server MUST inform the user agent via the 201 (Created) response. If an existing resource is modified, either the 200 (OK) or 204 (No Content) response codes SHOULD be sent to indicate successful completion of the request. If the resource could not be created or modified with the Request-URI, an appropriate error response SHOULD be given that reflects the nature of the problem. The recipient of the entity MUST NOT ignore any Content-* (e.g. Content-Range) headers that it does not understand or implement and MUST return a 501 (Not Implemented) response in such cases.
    • PATCH

      public static final Http.Method PATCH
      The PATCH method as described in RFC 5789 is used to perform an update to an existing resource, where the request payload only has to contain the instructions on how to perform the update. This is in contrast to PUT which requires that the payload contains the new version of the resource. If an existing resource is modified, either the 200 (OK) or 204 (No Content) response codes SHOULD be sent to indicate successful completion of the request.
    • DELETE

      public static final Http.Method DELETE
      The DELETE method requests that the origin server delete the resource identified by the Request-URI. This method MAY be overridden by human intervention (or other means) on the origin server. The client cannot be guaranteed that the operation has been carried out, even if the status code returned from the origin server indicates that the action has been completed successfully. However, the server SHOULD NOT indicate success unless, at the time the response is given, it intends to delete the resource or move it to an inaccessible location.
    • TRACE

      public static final Http.Method TRACE
      The TRACE method is used to invoke a remote, application-layer loop- back of the request message. The final recipient of the request SHOULD reflect the message received back to the client as the entity-body of a 200 (OK) response. The final recipient is either the origin server or the first proxy or gateway to receive a Max-Forwards value of zero (0) in the request (see section 14.31). A TRACE request MUST NOT include an entity.
  • Method Details

    • values

      public static Http.Method[] 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 Http.Method 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