Use enum for http methods

Just refactoring.