Class HttpUtils
java.lang.Object
org.apache.juneau.rest.common.utils.HttpUtils
HTTP utilities.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringdetectHttpMethod(Method m, boolean detectMethod, String def) Given a method name, infers the REST method name.static StringdetectHttpPath(Method m, String method) Given a Java method, infers the REST path.
-
Constructor Details
-
HttpUtils
public HttpUtils()
-
-
Method Details
-
detectHttpMethod
Given a method name, infers the REST method name.- Parameters:
m- The Java method.detectMethod- Whether we should auto-detect the HTTP method name from the Java method name.def- The default HTTP method if not detected.- Returns:
- The REST method name, or the default value if not found.
-
detectHttpPath
Given a Java method, infers the REST path.- Parameters:
m- The Java method.method- The HTTP method name if it's known.- Returns:
- The REST path or
null if not detected.
-