// Use this for initialization void Awake() { PreferenceList = new MyPreference(); gameObject.AddComponent <httpRequest>(); myApi = gameObject.GetComponent <httpRequest>(); myApi.GET("http://ec2-52-15-84-235.us-east-2.compute.amazonaws.com/myFYP/public/api/getGeneralPreferenceList"); StartCoroutine(getRequesting()); }
public virtual JsonResult Put(MyPreference model) { var command = new UpdateMyPreference(User, Request.AnonymousID); Mapper.Map(model, command); _preferences.Handle(command); return(Json(null)); }
private IEnumerator getRequesting() { yield return(myApi.httpResponse); //Debug.Log(myApi.getResult()); PreferenceList = MyPreference.CreateFromJSON(myApi.getResult()); UpdateBoardcast(); }