Package mg.emberframework.core.data
Class RequestVerb
java.lang.Object
mg.emberframework.core.data.RequestVerb
Defines constants and utilities for HTTP request verbs.
This utility class provides standard HTTP verb constants and a method to determine the verb associated with a given method based on annotations.
- Since:
- 1.0.0
- Version:
- 1.0.0
- Author:
- Sandratra NIAINA
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic String
getMethodVerb
(Method method) Determines the HTTP verb for a method based on its annotations.
-
Field Details
-
GET
Constant for HTTP GET verb.- See Also:
-
POST
Constant for HTTP POST verb.- See Also:
-
DELETE
Constant for HTTP DELETE verb.- See Also:
-
PUT
Constant for HTTP PUT verb.- See Also:
-
-
Method Details
-
getMethodVerb
Determines the HTTP verb for a method based on its annotations.Defaults to
GET
unless the method is annotated with@Post
.- Parameters:
method
- the method to analyze- Returns:
- the HTTP verb (e.g., "GET", "POST")
-