Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

set HTTP headers in WebEngine JavaFX

How to pass the HTTP Headers like

"Accept-Language", "Accept", "Accept-Encoding" to WebEngine in JavaFX? i have tried the method as specified in Setting a cookie using JavaFX's WebEngine/WebView, but it doesn't work. is there any API that is being exposed in Java 8 for achieving this? Pls suggest.

like image 753
Arun Avatar asked Sep 08 '14 10:09

Arun


1 Answers

Since JDK 8u60 the default locale of the application is automatically added to the "Accept-Language" header as the first option. This may help in some cases although it would of course be better to be able to set all these headers explicitly.

like image 193
mipa Avatar answered Sep 28 '22 07:09

mipa