add get and post for router.Url
clean up code for pep8