     }
     
     required init(server: String, username: String, password: String) {
-        // TODO: support auth headers
         self.serverUrl = "\(server)/httpAuth"
         self.username = username
         self.password = password


class TeamCityConnection : ITeamCityConnection {
    
    private let debugging = true
    
    private let serverUrl : String
    private let shouldConnectAsGuest : Bool

        if let accept = acceptHeader {
            request.addValue(accept, forHTTPHeaderField: "Accept")
        }
        
        if (!self.shouldConnectAsGuest) {
            let auth = NSString(string: "\(self.username ?? ""):\(self.password ?? "")").dataUsingEncoding(NSUTF8StringEncoding)!
            let encodedAuth = auth.base64EncodedStringWithOptions(NSDataBase64EncodingOptions.EncodingEndLineWithCarriageReturn)
            request.addValue("Basic \(encodedAuth)", forHTTPHeaderField: "Authorization")
        }
        
        let config = NSURLSessionConfiguration.defaultSessionConfiguration()
        let session = NSURLSession(configuration: config)
        
