2

I develop and android app which has webview. I want to send header value with url. If it is possible any one help me to give the source code.

Helal Khan
  • 867
  • 3
  • 10
  • 25

2 Answers2

4
Map<String, String> headers = new HashMap<String, String>();
headers.put(header-key, header-value);
mWebView.loadUrl(your url, headers);

does this one helps? http://developer.android.com/reference/android/webkit/WebView.html#loadUrl(java.lang.String,%20java.util.Map)

sam.wang.0723
  • 321
  • 1
  • 7
3

It is better to do that via HttpClient.

alexandr.opara
  • 454
  • 2
  • 7