问题
Is is possible to override Android WebView to use custom Accept-Language header?
回答1:
The current implementation of WebView already 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 WebView.loadUrl() for more information.
来源:https://stackoverflow.com/questions/12244375/how-can-i-override-android-webview-to-use-custom-accept-language-header