emptyRequestMethods:options:completionHandler:)' is deprecated: responseJSON deprecated and will be removed in Alamofire然后,当我将"responseJSON“替换为"responseDecodable”时,就会得到“协议‘作为一个类型不能符合’可解码‘”的错误。
有什么解决办法吗?
我有一个JSON格式,我不能用Alamofire解码。}
我称它为Alamofire,但当我执行response.data时,它不会返回。Alamofire.request("https://myurl.com.tr/api/tickets/\(userid)").responseJSON { (response) in
我想使用Alamofire查询我的后端,使用Alamofire的内建可编码解析编码响应,然后发布从生成的结构中提取出来的内容,供我的API类的调用者使用。total: Int}
let foo: String我可以通过以下方法获得、解析、发布和订阅所有内容type: MyServerData.self) .sink { response in /* Do stuff