DeleteRoomMessage.cs 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. /********************************************************************************
  5. ** Company: YC
  6. ** auth: CaoTing
  7. ** date: 2021\5
  8. ** desc: 删除房间
  9. *******************************************************************************/
  10. namespace Studio.Scripts.HttpMessage
  11. {
  12. public class DeleteRoomMessage : BaseHttpMessage
  13. {
  14. public DeleteRoomBody body;
  15. public string token
  16. {
  17. set
  18. {
  19. headers["token"] = value;
  20. }
  21. }
  22. public DeleteRoomMessage()
  23. {
  24. messageModuleType = MessageModuleType.Room;
  25. methodType = HttpMethodType.Post;
  26. _path = "v1/deleteRoom";
  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<DeleteRoomBody>(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 DeleteRoomBody
  49. {
  50. /// <summary>
  51. /// 房间ID
  52. /// </summary>
  53. public int roomID;
  54. }
  55. }