All Downloads are FREE. Search and download functionalities are using the official Maven repository.

spice.http.client.SessionManager.scala Maven / Gradle / Ivy

The newest version!
package spice.http.client

import spice.http.cookie.Cookie

class SessionManager(private var _session: Session = Session()) {
  def session: Session = _session

  def apply(cookies: List[Cookie.Response]): Session = synchronized {
    val filtered = session.cookies.filterNot(cookies.contains)
    _session = session.copy(filtered ::: cookies)
    session
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy