The current implementation WebViewalready allows you to add headers using the following syntax:
Map<String, String> headers = new HashMap<String, String>();
headers.put("Accept-Language", "fr_fr");
mWebView.loadUrl("http://developer.android.com", headers);
See more details WebView.loadUrl().
source
share