void ExhalationCompleteHandler(object sender, ExhalationCompleteEventArgs e) { this.isBad = !breath.IsBreathGood(breath.Breathlength, breath.MaxBreathLength, breath.ExhaledVolume, breath.MaxPressure); BarController.moveBar = false; string pres = ""; foreach (float f in pressures) { pres += f + ","; } pres += 0; pressures.Clear(); string ourPostData = "{\"name\": \"ed\",\"durationSeconds\": " + breath.Breathlength + ",\"pressure\": [" + pres + "] }"; byte[] pData = Encoding.ASCII.GetBytes(ourPostData.ToCharArray()); Dictionary <string, string> headers = new Dictionary <string, string>(); headers.Add("Content-Type", "application/json"); headers.Add("Cookie", "Our session cookie"); WWW www = new WWW("https://fury.azurewebsites.net/api/NewReading", pData, headers); }
void ExhalationCompleteHandler(object sender, ExhalationCompleteEventArgs e) { this.isBad = !breath.IsBreathGood(breath.Breathlength, breath.MaxBreathLength, breath.ExhaledVolume, breath.MaxPressure); BarController.moveBar = false; }