Enum EHttpVerb

  • All Implemented Interfaces:
    Serializable, Comparable<EHttpVerb>

    public enum EHttpVerb
    extends Enum<EHttpVerb>
    A list of well-known HTTP verbs, mostly those defined by the HTTP/1.0 and HTTP/1.1 standards.
    Since:
    7.0.1
    Author:
    XIMA MEDIA GmbH
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      DELETE
      The DELETE method requests that the target resource deletes its state.
      GET
      The GET method requests that the target resource transfers a representation of its state.
      HEAD
      The HEAD method requests that the target resource transfers a representation of its state, like for a GET request, but without the representation data enclosed in the response body.
      OPTIONS
      The OPTIONS method requests that the target resource transfers the HTTP methods that it supports.
      PATCH
      The PATCH method requests that the target resource modifies its state according to the partial update defined in the representation enclosed in the request.
      POST
      The POST method requests that the target resource processes the representation enclosed in the request according to the semantics of the target resource.
      PUT
      The PUT method requests that the target resource creates or updates its state with the state defined by the representation enclosed in the request.
      TRACE
      The TRACE method requests that the target resource transfers the received request in the response body.
    • Enum Constant Detail

      • DELETE

        public static final EHttpVerb DELETE
        The DELETE method requests that the target resource deletes its state.
      • GET

        public static final EHttpVerb GET
        The GET method requests that the target resource transfers a representation of its state. GET requests should only retrieve data and should have no other effect.
      • HEAD

        public static final EHttpVerb HEAD
        The HEAD method requests that the target resource transfers a representation of its state, like for a GET request, but without the representation data enclosed in the response body. This is useful for retrieving the representation metadata in the response header, without having to transfer the entire representation.
      • OPTIONS

        public static final EHttpVerb OPTIONS
        The OPTIONS method requests that the target resource transfers the HTTP methods that it supports. This can be used to check the functionality of a web server by requesting '*' instead of a specific resource.
      • PATCH

        public static final EHttpVerb PATCH
        The PATCH method requests that the target resource modifies its state according to the partial update defined in the representation enclosed in the request.
      • POST

        public static final EHttpVerb POST
        The POST method requests that the target resource processes the representation enclosed in the request according to the semantics of the target resource.
      • PUT

        public static final EHttpVerb PUT
        The PUT method requests that the target resource creates or updates its state with the state defined by the representation enclosed in the request.
      • TRACE

        public static final EHttpVerb TRACE
        The TRACE method requests that the target resource transfers the received request in the response body. That way a client can see what (if any) changes or additions have been made by intermediaries.
    • Method Detail

      • values

        public static EHttpVerb[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (EHttpVerb c : EHttpVerb.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static EHttpVerb valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
        NullPointerException - if the argument is null
      • getMethodName

        public String getMethodName()
        Returns:
        The method name of this HTTP verb, as it should be used in the request line of an HTTP request.
      • isSupportsMessageBody

        public boolean isSupportsMessageBody()
        Returns:
        Whether this HTTP method supports sending content via an HTTP message body.
      • isNonStandard

        public static boolean isNonStandard​(String verb)
        Parameters:
        verb - The name of an HTTP verb. This is case insensitive.
        Returns:
        true is the verb is not one of the pre-defined EHttpVerbs, false otherwise.
      • isStandard

        public static boolean isStandard​(String verb)
        Parameters:
        verb - The name of an HTTP verb. This is case insensitive.
        Returns:
        true is the verb is one of the pre-defined EHttpVerbs, false otherwise.
      • ofNameOrNull

        @Nullable
        public static EHttpVerb ofNameOrNull​(String verb)
        Parameters:
        verb - The name of an HTTP verb. This is case insensitive.
        Returns:
        The enum constant corresponding to the given name. null if either the given verb is null, or when the given verb is not a valid EHttpVerb.