public WitReply SendChatBotMessage(DateTime now, string msg) { System.Threading.Thread.Sleep(100); var param = ""; wit_url = wit_url + "&q=" + RestService.FormatTextForJSON(msg); WitReply reply; try { string value = m_helper.CallRestService(wit_url, "GET", param, headers); reply = new WitReply(value); } catch (Exception ex) { reply = new WitReply(ex); } return(reply); }
public static string GetValueInJSON(this List <IntentDefinition.IntentParam> data, string Constant) { return(RestService.FormatTextForJSON(GetValue(data, Constant))); }