0
我試圖從標題響應中檢索值,但似乎無法檢索到此?我試過allHeaderFields
,但似乎不是NSURLResponse
的成員?從發佈請求中檢索標題值
testProvider.request(.SignIn(email, password), completion: { result in
switch result {
case let .Success(response):
do {
try response.filterSuccessfulStatusCodes()
let data = try response.mapJSON()
}
catch {
// show an error to your user
}
case let .Failure(error):
print(error)
let description = "Error! Please check your internet connection"
delegate.loginProvider(self, didError: description)
}
})