 
     return promise
   }
-  
+
   // MARK: - Authentication
 
   public func authenticate(username username: String, password: String) {
     guard let header = Header.authentication(username: username, password: password) else {
       return
     }
-    
+
     customHeaders["Authorization"] = header
   }
-  
+
   func authenticate(authorizationHeader authorizationHeader: String) {
     customHeaders["Authorization"] = authorizationHeader
   }
-  
+
   func authenticate(bearerToken bearerToken: String) {
     customHeaders["Authorization"] = "Bearer \(bearerToken)"
   }
-  
+
   // MARK: - Helpers
-  
+
   func saveEtag(key: String, response: NSHTTPURLResponse) {
     guard let etag = response.allHeaderFields["ETag"] as? String else {
       return

  lazy var session: NSURLSession = {
    return NSURLSession(configuration: self.sessionConfiguration.value)
  }()
  
  var requestHeaders: [String: String] {
    var headers = customHeaders
    
    headers["Accept-Language"] = Header.acceptLanguage
    
    additionalHeaders.forEach { key, value in
      headers[key] = value
    }
    
    return headers
  }


  enum SessionTaskKind {
    case Data, Upload, Download
  }

  public var additionalHeaders = [String: String]()

  var baseURLString: URLStringConvertible?
