예제 #1
0
        public async Task PutSolenoid(Solenoid s)
        {
            HttpResponseMessage response = await client.PutAsJsonAsync(string.Format("solenoids/{0}", s.Id), s);

            //Console.WriteLine("PutCommand response: {0}", response.StatusCode.ToString());
            response.EnsureSuccessStatusCode();

            // return URI of the created resource.
            return;// response.Headers.Location;
        }
 public void PutSolenoid(Solenoid s)
 {
     string data     = JsonConvert.SerializeObject(s);
     string response = Put(string.Format("solenoids/{0}", s.Id), data);
 }