TheFinestArtist / FinestWebView-Android

Beautiful and customizable Android Activity that shows web pages within an app.
https://finestwebview.web.app
2.32k stars 532 forks source link

Add header Authorization to Url #160

Open kachroudi-Nedra opened 6 years ago

kachroudi-Nedra commented 6 years ago

Hi,

how can i add Authorization bearer header to url that i show?

i did this :

` String headers = "javascript: var myHeaders = new Headers(); myHeaders.append('Authorization','" + Token + "');";

new FinestWebView.Builder(context) .webViewAllowContentAccess(true) .webViewJavaScriptEnabled(true) .injectJavaScript(headers) .show(url);`

But it doesn't work, How can i do it correctly?

thank you for help,