IMake.cs 587 B

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