[akka-user] Re: Akka cookie from HttpResponse

2016-08-19 Thread Sarah Yin
Hi Rafal Thank for your reply, however, this still does not have the cookie value I'm expecting. I'm expecting something like #HttpOnly_.apple.com TRUE / TRUE 0 cookie_key cookie_value (this is generated by curl cookie jar) However from the set-cookie header, the result I've gained only

[akka-user] Re: Akka cookie from HttpResponse

2016-08-18 Thread Rafał Krzewski
Here's an example that you can try: https://gist.github.com/rkrzewski/46641359761eaa605fd62191b96b4416 (you can run it using akka.Main) Cheers, Rafał W dniu środa, 17 sierpnia 2016 20:56:21 UTC+2 użytkownik Sarah Yin napisał: > > Thanks for your reply. However the set-cookie does not contain

[akka-user] Re: Akka cookie from HttpResponse

2016-08-17 Thread Sarah Yin
Thanks for your reply. However the set-cookie does not contain the cookie value I'm looking for. Here's the one I've implemented in python which can retrieve the cookie value. > cookie_jar = cookielib.CookieJar() > non_redirecting_opener = urllib2.build_opener(NoRedirectionProcessor, >

[akka-user] Re: Akka cookie from HttpResponse

2016-08-17 Thread Rafał Krzewski
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: