Glad you found it Jean-Pierre, that's exactly the way to go :) I opened up a ticket to explain it more explicitly in the docs: https://github.com/akka/akka/issues/18604
Happy hakking! On Wed, Sep 30, 2015 at 9:29 AM, Jean-Pierre Thomasset < [email protected]> wrote: > Answering to myself, in case it may help others. > > Collecting cookies is as easy as > > val extractor = b.add(Flow[HttpResponse].map(_.headers.collect { case > `Set-Cookie`(x) ⇒ x})) > > > You then get a Flow of Seq[HttpCookie] ! > > Regards, > Jean-Pierre. > > On Tuesday, September 29, 2015 at 3:01:23 PM UTC+2, Jean-Pierre Thomasset > wrote: >> >> Hi all, >> >> In a HTTP Client application, I'm trying to extract the cookies of a >> HttpResponse object. I looked at the Akka Http documentation but I did not >> found any specific unmarshaller or parser to transform a "Set-Cookie" >> header to a HttpCookie. Do you know if there is one ? >> >> At the moment I have a connection pool flow which gives me a HttpResponse >> object from which I extract the 'Set-Cookie' headers and now I am trying to >> transform this sequence of 'Set-Cookie' HttpHeader to a sequence of >> HttpCookie to be used in future HttpRequests but I would rather use an >> existing implementation than implement it myself. >> >> Regards, >> Jean-Pierre. >> > -- > >>>>>>>>>> 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 [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/akka-user. > For more options, visit https://groups.google.com/d/optout. > -- Cheers, Konrad 'ktoso' Malawski Akka <http://akka.io/> @ Typesafe <http://typesafe.com/> -- >>>>>>>>>> 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
