123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- /********************************************************************************
- ** Company: YC
- ** auth: CaoTing
- ** date: 2021\5
- ** desc: 获取设置
- *******************************************************************************/
- namespace Studio.Scripts.HttpMessage
- {
- public class GetSettingsMessage : BaseHttpMessage
- {
- public GetSettingsBody body;
- public string token
- {
- set
- {
- headers["token"] = value;
- }
- }
- public override string path
- {
- get
- {
- _path = GetHttpGetForm<GetSettingsBody>(_path, body);
- return _path;
- }
- }
- public GetSettingsMessage()
- {
- messageModuleType = MessageModuleType.Set;
- methodType = HttpMethodType.Get;
- _path = "v1/getSettings";
- 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<GetSettingsBody>(body);
- }
- return _wwwForm;
- }
- }
- public override string ToBodyString()
- {
- return Newtonsoft.Json.JsonConvert.SerializeObject(body);
- }
- }
- public struct GetSettingsBody
- {
- /// <summary>
- /// 房间id
- /// </summary>
- // public int roomID;
- }
- }
|