How to specify Date format when using Alamofire 5 responseDecodable

Hi, I'm upgrading to Alamofire 5 and trying to convert all my requests, the thing is I previously used:

let decoder = JSONDecoder() decoder.dateDecodingStrategy = .iso8601

but now, I don't know where to put it. I've search in the documentation but al I see is encoding, not decoding...

thanks!

I assume one can do it through this interface:

So

let decoder = JSONDecoder()
decoder.dateDecodingStrategy = .iso8601
AF.request(...)
    .responseDecodable(of: SomeType.self, decoder: decoder) { response in
        print("\(response)")
    }
Terms of Service

Privacy Policy

Cookie Policy