         timeout:Double? = nil,
         URLQuery:String? = nil,
         requestBody:Data? = nil,
-        asyncProgressHandler:((HTTPProgress?) -> Void)? = nil,
+        asyncProgressHandler:(TaskProgressHandler)? = nil,
         asyncCompletionHandler:((HTTPResult?) -> Void)? = nil
         ) -> HTTPResult {
         return adaptor.request(

        timeout:Double? = nil,
        requestBody:Data? = nil,
        URLQuery:String? = nil,
        asyncProgressHandler:((HTTPProgress?) -> Void)? = nil,
        asyncCompletionHandler:((HTTPResult?) -> Void)? = nil
        ) -> HTTPResult {



typealias TaskID = Int
public typealias Credentials = (username:String, password:String)
public typealias TaskProgressHandler = (HTTPProgress) -> Void
typealias TaskCompletionHandler = (HTTPResult) -> Void
struct TaskConfiguration {
    let credential:Credentials?
