If you are acting as the client, you should be looking at Set-Cookie header in the response, no?
import akka.http.scaladsl.model.headers._ val cookies: Seq[HttpCookie] = response.headers.collect { case `Set-Cookie`(cookie) => cookie } or if you are expecting exactly one val cookie: Option[HttpCookie] = response.header[`Set-Cookie`].map(_.cookie) (I'm shooting of the hip here, sorry if it doesn't compile ;)) HTH, Rafał W dniu środa, 17 sierpnia 2016 08:28:24 UTC+2 użytkownik Sarah Yin napisał: > > Hi Akka User List, > > I'm trying to retrieve a cookie from akka HttpReqeust and get a > HttpResponse as a response. > > However, in my response I cannot find the cookie values. > > response.getHeader("Cookie") > > Just prints Option.Empty > > Has anyone got any idea how to retrieve cookie from HttpResponse? Thanks > in ad! > -- >>>>>>>>>> Read the docs: http://akka.io/docs/ >>>>>>>>>> Check the FAQ: >>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups "Akka User List" group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at https://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.