                         return requestResult
                     }
             } else {
-                let erronousResult = HTTPResult(data: nil, response: nil, error: invalidURLError, request: nil)
+                let erronousResult = HTTPResult(data: nil, response: nil, error: invalidURLError, task: nil)
                 if let handler = asyncCompletionHandler {
                     handler(erronousResult)
                 } else {

            result[cookie.name] = cookie
        }
        return result
        }()

    public var ok:Bool {
        return statusCode != nil && !(statusCode! >= 400 && statusCode! < 600)


            let isSync = asyncCompletionHandler == nil
            let semaphore = dispatch_semaphore_create(0)
            var requestResult:HTTPResult = HTTPResult(data: nil, response: nil, error: syncResultAccessError, task: nil)

            let caseInsensitiveHeaders = CaseInsensitiveDictionary<String,String>(dictionary:headers)
            if let request = synthesizeRequest(
