Package org.apache.juneau.internal
Class HttpUtils
java.lang.Object
org.apache.juneau.internal.HttpUtils
HTTP utilities.
See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
detectHttpMethod
(Method m, boolean detectMethod, String def) Given a method name, infers the REST method name.static String
detectHttpPath
(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.
-