Class HttpUtils

java.lang.Object
org.apache.juneau.internal.HttpUtils

public class HttpUtils extends Object
HTTP utilities.
See Also:
  • Constructor Details

  • Method Details

    • detectHttpMethod

      public static String detectHttpMethod(Method m, boolean detectMethod, String def)
      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

      public static String detectHttpPath(Method m, String method)
      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.