public static async Task DoIt() { /* var response = * * */ await HttpClient2.Doit("https://localhost:44301/api/employee/post", new NameValueCollection() { { "firstname", "Clarence" }, { "lastname", "Brathwaite" } }); }
public static string GetForceInfo(HttpClient2 client) { string outputstr = client.DownloadBytearr2(GlobalVal.ServerURL + "/root/gateway.action?command=player@getForceInfo", string.Empty, false); webAction_createrole action = (webAction_createrole)JsonManager.JsonToObject(outputstr, typeof(webAction_createrole)); Reward jiangli = action.action.data.reward; /*魏:1 蜀:2 吴:3*/ outputstr = client.Post_retbyte2(GlobalVal.ServerURL + "/root/gateway.action?command=player@setPlayerForce", string.Empty, "forceId=" + jiangli.forceId); Console.WriteLine(outputstr); return(outputstr); }
/* * http://s1344.gc.aoshitang.com/root/gateway.action?command=player@getPlayerList */ public RoleSel(HttpClient2 httpclient) { m_client = httpclient; }
public Login() { m_client = new HttpClient2(); }