How to set a cookie in a WS request?
val request = WS.url("http://testurl.com/test.pdf")
Is it possible?
I am using Play version 2.1.1
WS.url(theurl).withHeaders("Cookie" -> "cookiename=cookieval; name2=val2")
You can also add the domain and path to the cookie in the same way
WS.url("http://url.com").withHeaders("Cookie" -> "cookieName=value; domain=url.com; path=/")
Source: https://habr.com/ru/post/951210/More articles:https://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/951205/how-to-use-sass-to-parse-a-list-of-all-css-selectors-in-an-scss-file&usg=ALkJrhj1vdrIAS0zahNIssXIEHtQkLADtAmargin-left and margin-right to adjust the center position - htmlC # timer stops after a certain number of ticks automatically - c #Initializing StringBuilder in Java - javaSass store selector in a variable - cssIE, CSS: how to remove the selection that appears when the button is clicked - htmlBuild Standalone ASP.Net Web Application - web-applicationsWhat does command A (~ A) really do in matlab - matlabWhy am I getting an unexpected operator error in the w bash equality test? - bashFor a loop in the array read 'remove'? - javascriptAll Articles