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

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

There is a newer version: 0.6.1
Show 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