C# unity3D get post
来源:互联网 发布:linux swap 释放 编辑:程序博客网 时间:2024/06/05 18:32
C# IEnumerator 搜索 yield return
//测试GET方法
StartCoroutine(SendGet("http://postman-echo.com/time/now"));
//测试POST方法
var form = new WWWForm();
form.AddField("int", "6");
StartCoroutine(SendPost("http://kun.show.ghostry.cn/", form));
IEnumerator SendGet(string _url)
{
WWW getData = new WWW(_url);
yield return getData;
if(getData.error != null)
{
Debug.Log(getData.error);
}
else
{
Debug.Log(getData.text);
}
}
IEnumerator SendPost(string _url, WWWForm _wForm)
{
WWW postData = new WWW(_url, _wForm);
yield return postData;
if (postData.error != null)
{
Debug.Log(postData.error);
}
else
{
Debug.Log(postData.text);
}
}
StartCoroutine(SendGet("http://postman-echo.com/time/now"));
var form = new WWWForm();
form.AddField("int", "6");
StartCoroutine(SendPost("http://kun.show.ghostry.cn/", form));
{
WWW getData = new WWW(_url);
yield return getData;
if(getData.error != null)
{
Debug.Log(getData.error);
}
else
{
Debug.Log(getData.text);
}
}
{
WWW postData = new WWW(_url, _wForm);
yield return postData;
if (postData.error != null)
{
Debug.Log(postData.error);
}
else
{
Debug.Log(postData.text);
}
}
0 0
- C# unity3D get post
- Unity3D之Get与Post
- C# Get和Post
- C# post和get
- C# get post区别
- c# post-get
- Unity3D HTTP协议 网络通信 post get
- unity3d中的http通信 post/get
- C# VC HTTP POST GET
- C#请求网页(Get、Post)
- C# 后台GET、POST 传值
- c# POST And Get提交
- C#请求网页(Get、Post)
- c# http get post 用法
- C# 模拟web Get,Post
- c# get post 的方法
- C# POST,GET 提交数据
- C# get post之 get 方式
- 七牛操作流程
- ssh/sftp无需密码登录配置
- Android 操作SQLite基本用法
- 自定义栈
- 为什么数据库有时候不能定位阻塞(Blocker)源头的SQL语句
- C# unity3D get post
- Android基础-ImageView设置动图
- java面试基础
- Linux下生成patch和打patch
- shell -- 变量做命令执行
- 高并发的核心技术-幂等的实现方案
- 2440超详细uboot移植笔记(十)------支持NOR FLASH
- 小心你的杀毒软件变成攻击你的利器
- Muduo之Acceptor源码分析笔记