Create logic for create and update methods in task controller.
Add respond formats for create and destroy actions.