Correct way of sending PUT data from AngularJs. We should test POST as well