EndCallRequest GetRequestInfo() { // Get the Json from the POST. string strJson = String.Empty; HttpContext context = HttpContext.Current; context.Request.InputStream.Position = 0; using (StreamReader inputStream = new StreamReader(context.Request.InputStream)) { strJson = inputStream.ReadToEnd(); } // Deserialize the Json. EndCallRequest req = JsonConvert.DeserializeObject <EndCallRequest>(strJson); return(req); }
public bool EndCall(string login, string password, string call_id) { string request = SERVER_DOMAIN + END_CALL + "login="******"&password="******"&call_id=" + call_id; string json = makeRequest(request); try { EndCallRequest endCallRequest = JsonConvert.DeserializeObject <EndCallRequest>(json); return(endCallRequest.end_call); } catch (Exception e) { MessageBox.Show(e.ToString()); } return(false); }