 //
 
 import Foundation
+#if os(macOS)
+    import AppKit
+#endif
+#if os(iOS)
+    import UIKit
+#endif
 //进度获取
 public typealias progressHandler = ((_ countOfBytesReceived: Int64 ,_ countOfBytesExpectedToReceive: Int64) -> Void)
 //完成回调,包含成功,失败和数据,推荐使用

                    }
                }
            #endif
        }
        DispatchQueue.main.async {
            if let completionHandler = self.completionHandler{

    #if os(iOS)
    public var imageHandler:((UIImage?,Error?)->Void)?
    #endif
    #if os(macOS)
    public var imageHandler:((NSImage?,Error?)->Void)?
    #endif
    //进度获取
    public var progressHandler:progressHandler?
    public var response:URLResponse?
