public void AddAbuseReport(AbuseReport abuse_report) { try { List<string> m_ServerURIs = m_registry.RequestModuleInterface<IConfigurationService>().FindValueOf("AbuseReportsServerURI"); foreach (string m_ServerURI in m_ServerURIs) { Dictionary<string, object> ar = abuse_report.ToKVP(); ar.Add("METHOD", "AddAbuseReport"); SynchronousRestFormsRequester.MakeRequest("POST", m_ServerURI, WebUtils.BuildQueryString(ar)); } } catch (Exception e) { MainConsole.Instance.DebugFormat("[ABUSEREPORT CONNECTOR]: Exception when contacting friends server: {0}", e.Message); } }
public void UpdateAbuseReport(AbuseReport report, string Password) { try { Dictionary<string, object> send = report.ToKVP(); send.Add("Password", Password); send.Add("METHOD", "AddAbuseReport"); List<string> m_ServerURIs = m_registry.RequestModuleInterface<IConfigurationService>().FindValueOf("AbuseReportsServerURI"); SynchronousRestFormsRequester.MakeRequest("POST", m_ServerURIs[0], WebUtils.BuildQueryString(send)); } catch (Exception e) { MainConsole.Instance.DebugFormat("[ABUSEREPORT CONNECTOR]: Exception when contacting friends server: {0}", e.Message); } }