thewar_client/Client/Assets/1_Script/System/Http/Protocol.cs

40 lines
718 B
C#

using BestHTTP;
using Newtonsoft.Json;
using System;
public enum Protocol
{
//0~100 테스트용 프로토콜
Test = 0,
AddUser = 1,
Downlode = 100,//기획 데이터 다운로드
}
#region 100 : Downlode
public class DownlodeReq
{
public string version { get; set; }
public DownlodeReq()
{
version = Statics.version;
}
}
public class DownlodeResp : Request<DownlodeResp>
{
private Protocol protocol = Protocol.Downlode;
public string data { get; set; }
public string version { get; set; }
public void Request(Action<DownlodeResp> onRequestFinished)
{
CreateRequest(protocol, onRequestFinished, new DownlodeReq(), HTTPMethods.Post, null);
}
}
#endregion