Refactor common code of delete rquests into helper method.
Refactor common code of post requests into helper method.
Refactor common code of put requests into helper method.
Refactor create_cronjob to also use helper method.