-
- 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 inHttp.Method
enumeration.- See Also:
Http.Method
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static Http.RequestMethod
create(String name)
Create new HTTP request method instance from the provided name.String
name()
Get method name.
-
-
-
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 benull
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 ornull
.
-
name
String name()
Get method name.- Returns:
- a method name.
-
-