changed post and get requests to server