123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- namespace Studio.Scripts.HttpMessage
- {
- public class CreateRoomMessage : BaseHttpMessage
- {
- public CreateRoomBody body;
- public string token
- {
- set
- {
- headers["token"] = value;
- }
- }
- public CreateRoomMessage()
- {
- messageModuleType = MessageModuleType.Room;
- methodType = HttpMethodType.Post;
- _path = "v1/createRoom";
- headers = new Dictionary<string, string>();
- headers.Add("Content-Type", "application/json");
- headers.Add("token", "");
- _wwwForm = null;
- }
- public override WWWForm wwwForm
- {
- get
- {
- if (_wwwForm == null)
- {
- _wwwForm = GetWWWFrom<CreateRoomBody>(body);
- }
- return _wwwForm;
- }
- }
- public override string ToBodyString()
- {
- return Newtonsoft.Json.JsonConvert.SerializeObject(body);
- }
- }
- public struct CreateRoomBody
- {
-
-
-
- public int type;
-
-
-
- public string roomName;
-
-
-
- public string roomExplain;
-
-
-
- public string roomPassword;
-
-
-
- public int roomType;
-
-
-
- public int maxMember;
- }
- }
|