code: @Deprecated
      protected final void requirePOST() throws ServletException {
          StaplerRequest req = Stapler.getCurrentRequest();
          if (req==null)  return; // invoked outside the context of servlet
          String method = req.getMethod();
          if(!method.equalsIgnoreCase("POST"))
              throw new ServletException("Must be POST, Can't be "+method);
      }
docs: Convenience method to verify that the current request is a POST request.
  
  @deprecated
  Use {@link RequirePOST} on your method.