// Use this for initialization void Start() { restManager = RestManagerGameObject.GetComponent <RestManager>(); namePanel = NameField.GetComponent <NamePanel>(); sm = SM.GetComponent <SeatManager> (); Debug.Log("Querying"); restManager.Post("http://172.20.47.233:8080/api/session", ProcessCurrentSession(), null); Debug.Log("Queried"); }
private void ProcessReceivedSession() { Debug.Log(restManager.Results.text); var session = Session.GetFromJson(restManager.Results.text); namePanel.ChangeName(session.name); List <Seat> selected = new List <Seat> { new Seat(1, 2), new Seat(1, 3), new Seat(1, 3), }; var returnJson = JsonUtility.ToJson(selected); Debug.Log(returnJson); restManager.Post("http://172.20.47.233:8080/api/reservation", new Dictionary <string, string> { { "selectedSeats", returnJson } }, ProcessPostAck); }