I'm attempting to use spray-client and spray-httpx and I'm having trouble figuring out how to convert 'set-cookie' headers from HttpResponse
to a 'cookie' header that I'd like to set on an HttpRequest
val responseSetCookieHeaders = response.headers filter { _.name == "Set-Cookie" }
...
val requestCookieHeader:HttpHeader = ???
...
addHeader(requestCookieHeader) ~> sendReceive ~> { response => ??? }
I do see spray.http.HttpHeaders.Cookie
, but I see no way to convert from an instance of HttpHeader
to HttpCookie
...
Set-Cookie
: val responseSetCookieHeader:HttpHeader = ???; responseSetCookieHeader match { case HttpHeader.Set-Cookie
(c) => println(c.content) }. thank you for putting me on the right track! – Zymotic