wwwform

[unity3d]unity跟.net进行http通信

回眸只為那壹抹淺笑 提交于 2020-03-25 12:57:44
3 月,跳不动了?>>> 谈谈今天的学习感受,今天收获最大的就是解决了u3d向.net提交表单,然后.net服务器将接受过来的表单数据保存到sqlserver数据库中。unity3d中wwwform默认的是post提交的。 http 提交数据原理 http 协议通过 url来获取和提交数据 。提交数据的方式 有两种,一种是get方法,一种是post方法。get一般用于告诉服务器把满足参数的数据发送给回来。 例如:get 的html代码如下: [html] view plain copy < form action = "search.php" method = "GET" > < username: < inputtype inputtype ="text" name ="user" /> < br > < password: < inputtype inputtype ="password " name ="pwd" /> < br > < input type ="submit" value ="login" /> </ form > post一般是将数据发送给服务器,服务器将这些数据进行处理,比如说存储到数据库。 例如:post的html 代码如下: [html] view plain copy < form action = "login.php" method =