IMake.cs 632 B

12345678910111213141516171819202122
  1. using System.Web;
  2. using Common;
  3. using Custom;
  4. using LitJson;
  5. namespace Feign
  6. {
  7. public class IMake
  8. {
  9. public static string makeFile(string data)
  10. {
  11. string url = Utils.FeignUrl["omega_make"] + "/v1/omega_make/vscode/makeFile";
  12. string content = Function.PostWebRequest(url, "{\"content\":\"" + HttpUtility.UrlEncode(data) + "\"}", "application/json");
  13. JsonData jsonObj = JsonMapper.ToObject(content);
  14. if(jsonObj["status"].ToString() == "1")
  15. {
  16. return jsonObj["data"].ToString();
  17. }
  18. return "";
  19. }
  20. }
  21. }