Refactory and more HTTP checks in GET and PUT methods