swift post请求参数类型为json
来源:互联网 发布:离线整个知乎 编辑:程序博客网 时间:2024/05/17 04:53
var url:String="http://******"
var roomDic=Dictionary<String,String>()
roomDic["roomId"]=“fff”
roomDic["roomPassword"]="123456"
post(url,roomDic)
func post(url:String,paramDic:Dictionary<String,String>){
Alamofire.request(.POST, url,parameters:paramDic, encoding: .JSON)
.responseJSON{response in
debugPrint(response)
}
}
抓包显示的参数类型为{“roomId”:"fff","roomPassword":"12344"};
看到这可爱的json 参数我真是的是太爽了,找了好久终于找到了,好强大的的Alamofire(在github 查找这个第三方库,不知道怎么用可以看我之前的博客),看看我之前写的字符串转json 真是太痛苦了,哈哈哈。
0 0
- swift post请求参数类型为json
- postman测试post请求参数为json类型
- post请求中参数为json格式
- JAVA HTTP POST请求(请求参数格式为json)
- Android Retrofit2 Post请求添加Json类型参数笔记
- ExtJS发送POST请求 参数格式为JSON
- post请求公共接口,参数为json串
- Swift + JSP + JSON实现服务器POST请求
- python http请求post参数,json解析
- Post 请求参数 数据装载. 生成JSON
- http post 请求参数格式是json
- Java Post请求 传递Json参数
- swift提交json.swfit post json.swfit提交header参数
- ios 网络请求参数为json
- 网络请求参数为json形式
- retrofit网络请求参数为json
- Post请求方式长度参数过长导致参数为空
- SpringMVC如何接受POST请求中的json参数
- 【Leetcode】Swap Nodes in Pairs
- 【图解】Web前端实现类似Excel的电子表格
- OpenGL: 填充非凸多边形 (转)
- 为何 YunOS 有别于 Android?
- URl 传参
- swift post请求参数类型为json
- 动画卡顿之路
- C++ Primer 学习笔记 ——语句
- 数据库水平切分的实现原理解析---分库,分表,主从,集群,负载均衡器(转)
- LeetCode 31 Next Permutation(下一个排列)
- Git移除敏感数据
- OpenGL绘制填充非凸边形
- 多管齐下、与时俱进,唯品会再创佳绩
- HTML5新增标签2,视频,音频,调节颜色