- 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.
Interface representing an HTTP request method, all standard methods are in
Http.Method
enumeration.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic Http.RequestMethod
Create new HTTP request method instance from the provided name.name()
Get method name.
-
Method Details
-
create
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.
-