 extension WTURLSessionManager:URLSessionDataDelegate{
     
     public func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive response: URLResponse, completionHandler: @escaping (URLSession.ResponseDisposition) -> Swift.Void){
-        if let task = self[dataTask] {
+        if let task = self[dataTask] as? WTURLSessionDataTask {
             task.urlSession(session, dataTask: dataTask, didReceive: response, completionHandler: completionHandler)
         }else{
             completionHandler(URLSession.ResponseDisposition.allow)

     这里的task和data是私有的,原因在于不允许外界修改,想要得到原始的task只需要调用otigintask就可以了
     */
    //原始的task
    private var task: URLSessionTask
    //懒加载,需要的时候创建对象
    private lazy var data:Data = Data()
    private var error: Error?
    
    
    init(task: URLSessionTask) {

        }
    }
    
}
open class WTURLSessionDownloadTask:WTURLSessionTask,URLSessionDownloadDelegate{
    public func urlSession(_ session: URLSession, downloadTask: URLSessionDownloadTask, didFinishDownloadingTo location: URL){
        
    }
