Added a method to get the allowed methods for a path.