Refactored get/post and worked on post requests