Added a method to determine route method (put or post)