   var request: ClientRequest?
   var response: ClientResponse?
   var data: NSData?
-  var error: RequestError?
+  var error: ErrorProtocol?
   
-  typealias ResponseArguments = (request: ClientRequest?, response: ClientResponse?, data: NSData?, error:RequestError?)
+  typealias ResponseArguments = (request: ClientRequest?, response: ClientResponse?, data: NSData?, error:ErrorProtocol?)
   typealias CompletionHandler = ResponseArguments -> Void
   
   init(method: RequestMethod,

      self.request = request
    } catch {
      self.request = nil
      self.error = error as! RequestError
    }
  }
  

      return
    }
    
    // TODO: This returns data that is not UTF8 encoded - fix it
    let data = NSMutableData()
    do {
      try response.read(into: data)
