public void update_(FriendModel friendModel, string id) { WWWForm form = new WWWForm(); form.AddField("friend_id", friendModel.friend_id); form.AddField("friend_from", friendModel.friend_from); form.AddField("friend_to", friendModel.friend_to); form.AddField("status", friendModel.status); httpHandlerScript.POST(Config.apiUrl + "friends/update/" + id, CallBackUpdate, form); }
public void create(FriendModel friendModel) { WWWForm form = new WWWForm(); form.AddField("friend_id", friendModel.friend_id); form.AddField("friend_from", friendModel.friend_from); form.AddField("friend_to", friendModel.friend_to); form.AddField("status", friendModel.status); httpHandlerScript.POST(Config.apiUrl + "friends/store", CallBackCreate, form); }
void CallBackDelete(string response) { if (response == "") { return; } FriendModel friend = JsonUtility.FromJson <FriendModel>(response); print(friend); }