我有两个Web服务,并且使用Alamofire。
- 第一个Web服务是
.get
方法,我已经得到了JSON结果。 - 对于第二个Web服务是
.post
方法,我需要将第一个Web服务JSON结果传递给参数以获取最终数据列表。
想要实现:将第一个Web服务json数据传递给第二个Web服务(参数)或任何建议以获取最终数据。 请任何人帮助....
第一个Web服务:
Alamofire.request("http://getconstantTableList",method: .get,encoding: encoding,headers: [ "accept":"application/json","Authorization":"Bearer \(token ?? "")"])
.responseJSON { respo in
print(respo)
结果优先Web服务:
{
"items": [
{
"actionType": 101,"version": 1
},{
"actionType": 1015,"version": 1
}
]
}
第二个Web服务:
Alamofire.request("http://getconstantTableData",method: .post,parameters: ??? encoding: encoding,"Authorization":"Bearer \(token ?? "")"])
.responseJSON { response in
print(response)
}