using System.Collections; using System.Collections.Generic; using UnityEngine; /******************************************************************************** ** Company: YC ** auth: CaoTing ** date: 2021\5 ** desc: 删除房间 *******************************************************************************/ 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(); headers.Add("Content-Type", "application/json"); headers.Add("token", ""); _wwwForm = null; } public override WWWForm wwwForm { get { if (_wwwForm == null) { _wwwForm = GetWWWFrom(body); } return _wwwForm; } } public override string ToBodyString() { return Newtonsoft.Json.JsonConvert.SerializeObject(body); } } public struct CreateRoomBody { /// /// 房间类型1 是个人房间 2是公共房间 /// public int type; /// /// 房间名称 /// public string roomName; /// /// 房间信息说明 /// public string roomExplain; /// /// 房间密码 /// public string roomPassword; /// /// 公开房间类型 1 是只能浏览 2是 全功能 /// public int roomType; /// /// 人数上限 /// public int maxMember; } }