HttpUtils.cs 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. /* ==============================================================================
  2. * 功能描述:HttpUtils
  3. * 创 建 者:Garrett
  4. * 创建日期:2019/9/16 17:43:45
  5. * ==============================================================================*/
  6. using System;
  7. using System.Collections.Generic;
  8. using System.Linq;
  9. using System.Text;
  10. namespace Update
  11. {
  12. /// <summary>
  13. /// HttpUtils
  14. /// </summary>
  15. public class HttpUtils
  16. {
  17. public static string GetDownloadUrl(string name)
  18. {
  19. var url = $"{Const.URL}/image-service/common/file_get/{name}?systemId={Const.RevitServiceId}";
  20. return url;
  21. }
  22. public static string GetUploadUrl(string name)
  23. {
  24. var url = $"{Const.URL}/image-service/common/file_upload/?systemId={Const.RevitServiceId}&secret={Const.RevitServiceSecret}&key={name}&overwrite=true";
  25. return url;
  26. }
  27. public static string DeleteUrl()
  28. {
  29. string url = $"{Const.URL}/image-service/common/files_delete?systemId={Const.RevitServiceId}&secret={Const.RevitServiceSecret}";
  30. return url;
  31. }
  32. }
  33. }