How can I override Android WebView to use custom Accept-Language header?

后端 未结 1 1207
独厮守ぢ
独厮守ぢ 2021-01-20 05:36

Is is possible to override Android WebView to use custom Accept-Language header?

1条回答
  •  孤城傲影
    2021-01-20 06:02

    The current implementation of WebView already allows you to add headers using the following syntax:

    Map headers = new HashMap();
    headers.put("Accept-Language", "fr_fr");
    mWebView.loadUrl("http://developer.android.com", headers);
    

    See WebView.loadUrl() for more information.

    0 讨论(0)
提交回复
热议问题