IMake.cs 736 B

1234567891011121314151617181920212223
  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. Function.WriteLog("{\"content\":\"" + HttpUtility.UrlEncode(data) + "\"}", "生成文件");
  13. string content = Function.PostWebRequest(url, "{\"content\":\"" + HttpUtility.UrlEncode(data) + "\"}", "application/json");
  14. JsonData jsonObj = JsonMapper.ToObject(content);
  15. if(jsonObj["status"].ToString() == "1")
  16. {
  17. return jsonObj["data"].ToString();
  18. }
  19. return "";
  20. }
  21. }
  22. }