Reputation: 501
I have a JSESSIONID that I need to set on my http request. I'm using play framework. Tried: WS.url(XML_MNP_URL).withHeaders("Cookie" -> headerSessionId)
but it doesn't work. Please help, thanks
Upvotes: 1
Views: 1307
Reputation: 3298
To add cookies to a request using withHeaders
use COOKIE
, not "Cookie"
when setting the headers:
WS.url(XML_MNP_URL).withHeaders(COOKIE -> "foo=bar")
The request will now include Cookie: foo=bar
as a header
Upvotes: 1