You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
733 B

  1. using DefenseWeb.Attribute;
  2. using DefenseWeb.Models;
  3. using Newtonsoft.Json;
  4. using OT.COM.SignalerMessage;
  5. using System;
  6. using System.Collections.Generic;
  7. using System.Linq;
  8. using System.Net;
  9. using System.Net.Http;
  10. using System.Web;
  11. using System.Web.Http;
  12. namespace DefenseWeb.Controllers
  13. {
  14. public class CmdController : ApiController
  15. {
  16. [HttpPost]
  17. [DeflateCompression]
  18. public HttpResponseMessage GetData()
  19. {
  20. var httpContent = Request.Content;
  21. var asyncContent = httpContent.ReadAsStringAsync().Result;
  22. asyncContent = asyncContent.Substring(1);
  23. return (new CmdService()).GetData(asyncContent, true, Request);
  24. }
  25. }
  26. }