Helal Khan
Helal Khan

Reputation: 887

How do i send Header value with webview url?

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.

Upvotes: 2

Views: 2023

Answers (2)

alexandr.opara
alexandr.opara

Reputation: 454

It is better to do that via HttpClient.

Upvotes: 3

sam.wang.0723
sam.wang.0723

Reputation: 321

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)

Upvotes: 4

Related Questions