Reputation: 1826
I have been trying to use "responseDecodable" method from Alamofire, but I'm getting "Generic parameter 'T' could not be inferred" error while using it.
Can someone guide me how to fix this?
Upvotes: 15
Views: 15827
Reputation: 12770
As you can read in the documentation, using responseDecodable
is straightforward:
AF.request(...).responseDecodable(of: ResponseType.self) { response in
...
}
Upvotes: 24