/// <summary> /// 发送Http请求,建立一个账户 /// </summary> /// <param name="go"></param> private void OnRegSureClicked(GameObject go) { //获取一个http请求的对象 HttpPostRequest hp = Global.NetMgr.GetHttpRequest(); //设置地址 hp.SetURL(url); hp.PutString("username", Reg_name.value); hp.PutString("password", Reg_pwd.value); hp.OnComplete += Hp_OnComplete; //发出请求 hp.StartRequest(); }
// Use this for initialization void Start() { //获取一个http请求的对象 HttpPostRequest hp = Global.NetMgr.GetHttpRequest(); //设置地址 hp.SetURL(url); hp.PutString("username", "luzhiming"); hp.PutString("password", "123"); hp.OnComplete += Hp_OnComplete; //发出请求 hp.StartRequest(); }