Hi,
Why there are 2 methods for the same task in EventMonitor? I need to implement both otherwise some requests are not handled.
func request(_ request: DataRequest, didParseResponse response: DataResponse<Data?, AFError>) {
}
func request<Value>(_ request: DataRequest, didParseResponse response: DataResponse<Value, AFError>) {
}
Jon_Shier
(Jon Shier)
2
As you can see in the documentation, func request(_ request: DataRequest, didParseResponse response: DataResponse<Data?, AFError>) is called when a response is not serialized with using a ResponseSerializer, while request<Value>(_ request: DataRequest, didParseResponse response: DataResponse<Value, AFError>) is called when a ResponseSerializer is used. You shouldn't be receiving both unless you're using both types of response handler.
Oh, I am using both probably. Thanks for clarifications.