Interface Http.RequestMethod

  • All Known Implementing Classes:
    Http.Method
    Enclosing class:
    Http
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public static interface Http.RequestMethod
    Interface representing an HTTP request method, all standard methods are in Http.Method enumeration.
    See Also:
    Http.Method
    • Method Detail

      • create

        static Http.RequestMethod create​(String name)
        Create new HTTP request method instance from the provided name.

        In case the method name is recognized as one of the standard HTTP methods, the respective enumeration value is returned.

        Parameters:
        name - the method name. Must not be null or empty and must be a legal HTTP method name string.
        Returns:
        HTTP request method instance representing an HTTP method with the provided name.
        Throws:
        IllegalArgumentException - In case of illegal method name or in case the name is empty or null.
      • name

        String name()
        Get method name.
        Returns:
        a method name.