我刚到Alamofire岁,所以如果这是一个noob问题,我很抱歉:this framework stores the cookies automatically?
这是因为我有一个简单的请求:
Alamofire.request(.POST, loginURL, parameters: ["fb_id": fbId, "fb_access_token": fbToken])
.responseJSON { response in
//print(response.request) // original URL request
//print(response.response) // URL response
//print(response.data) // server data
//print(response.result) // result of response serialization
if let JSON = response.result.value {
print("loginURL - JSON: \(JSON)")
}
}
这个请求响应带有cookie会话,出于安全原因,我需要执行其他请求;奇怪的是,像magic一样,我已经可以在第一篇帖子之后完成其他请求,而不用手动读取cookie并存储它.我确信其他请求需要cookie会话,因为它们在例如postman上失败,但在这里不是.
这只是一个功能?因为我在官方的GitHub page上也找不到这方面的任何东西.