using System.Collections.Generic; using System.Net.Http; namespace LrGetToken { /// /// API请求类 /// public class APIRequest { private string _path = ""; /// /// 请求路径 /// public string Path { get { return _path.TrimStart('/').TrimEnd('/'); } set { _path = value; } } ///// ///// 请求Method ///// public HttpMethod Method = HttpMethod.Get; ///// ///// 请求ContentType,默认为 application/json ///// public string ContentType = "application/json"; /// /// Param 参数 /// public IDictionary Params = new Dictionary(); /// /// 附加的Http Header /// public IDictionary Header = new Dictionary(); /// /// 请求体 /// public object Body { get; set; } /// /// 上传文件的路径 /// public string File { get; set; } } }