FileAddressMessage.cs 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. /********************************************************************************
  5. ** Company: YC
  6. ** auth: CaoTing
  7. ** date: 2021\5\24
  8. ** desc: 文件存储地址
  9. *******************************************************************************/
  10. namespace Studio.Scripts.HttpMessage
  11. {
  12. public class FileAddressMessage : BaseHttpMessage
  13. {
  14. public FileAddressBody body;
  15. public string token
  16. {
  17. set
  18. {
  19. headers["token"] = value;
  20. }
  21. }
  22. public FileAddressMessage()
  23. {
  24. messageModuleType = MessageModuleType.Common;
  25. methodType = HttpMethodType.Get;
  26. _path = "v1/fileAddress";
  27. headers = new Dictionary<string, string>();
  28. headers.Add("Content-Type", "application/json");
  29. headers.Add("token", "");
  30. _wwwForm = null;
  31. }
  32. public override WWWForm wwwForm
  33. {
  34. get
  35. {
  36. if (_wwwForm == null)
  37. {
  38. _wwwForm = GetWWWFrom<FileAddressBody>(body);
  39. }
  40. return _wwwForm;
  41. }
  42. }
  43. public override string ToBodyString()
  44. {
  45. return Newtonsoft.Json.JsonConvert.SerializeObject(body);
  46. }
  47. }
  48. public struct FileAddressBody
  49. {
  50. }
  51. }