Unity自带WWW Get与Post的方式获得数据
来源:互联网 发布:php hashmap的实现原理 编辑:程序博客网 时间:2024/06/05 19:54
1.尝试GET方式通信
usingUnityEngine;usingSystem.Collections; publicclassJsonTest : MonoBehaviour { privatestringurl = "http://map.exceedu.com/iface/login.php?opt=logcheck"; // Use this for initialization IEnumerator Start () { WWW getData = newWWW(url); yieldreturngetData; if(getData.error != null) { Debug.Log(getData.error); } else{ Debug.Log(getData.text); } }}
2.利用POST方式通信
usingUnityEngine;usingSystem.Collections; publicclassJsonTest : MonoBehaviour { privatestringurl = "http://map.exceedu.com/iface/login.php?opt=logcheck"; // Use this for initialization IEnumerator Start () { WWWForm form = newWWWForm(); form.AddField("userid","ABC"); form.AddField("pwd","***"); WWW getData = newWWW(url, form); yieldreturngetData; if(getData.error != null) { Debug.Log(getData.error); } else{ Debug.Log(getData.text); } }}
1 0
- Unity自带WWW Get与Post的方式获得数据
- unity Get与Post的方式获得数据
- 提交数据的方式:GET与POST
- 获得数据的post,get
- Unity自带的网络编程方式
- get/post 方式,form/数据的获取
- Ajax以post方式传送带参的数据方式与get请求的不同
- post与get提交方式的区别
- post与get提交方式的区别
- GET与POST提交方式的不同
- get与post提交方式的区别
- get与post提交方式的区别
- get与post提交方式的区别
- get与post提交方式的区别
- get与post方式的区别
- get与post提交方式的区别
- get与post提交方式的对比
- Ajax的get与post方式
- matplotlib-绘制精美的图表
- MySQL数据库入门(五)
- HTTP,HTTPS协议知识点总结
- ZOJ 3872 Beauty of Array
- java中为神魔提供基本类型的类封装
- Unity自带WWW Get与Post的方式获得数据
- DLL之间的容器传递;STL+DLL
- SAE 使用 Git上传项目代码
- 记录Android studio打包生成apk,的详细步骤
- Spark2.1.0文档:Spark编程指南-Spark Programming Guide
- 前端_html
- WebRTC学习笔记_Demo收集
- OpenCV3.0中CommandLineParser类
- QT写文本文件(QTextStream 写文件)