Add a property on WebView to set additional headers
See original GitHub issueDescription
On the platform specific WebView you can launch the browser view with some additional headers set (for example for authentication). Maui WebView doesn’t have this capability at the moment and you must override handlers mapping for each platform
Public API Changes
<WebView Source={Binding Url} Headers={Binding Headers} />
Intended Use-Case
Simplify webview automatic authentication
Issue Analytics
- State:
- Created a year ago
- Reactions:4
- Comments:13 (1 by maintainers)
Top Results From Across the Web
Add custom headers to WebView resource requests - android
First you need to create method, which will be returns your headers you want to add to request: private Map<String, String> getCustomHeaders() { ......
Read more >Add custom headers to WebView resource requests - android
Android : Add custom headers to WebView resource requests - android [ Beautify Your Computer : https://www.hows.tech/p/recommended.html ] ...
Read more >WKWebView setValue forHTTPHeaderField problem
I'm looking for a solution to navigate a URL with header's variable. I know we can create a request and setValue with forHTTPHeaderField...
Read more >Adding Authorization Header in Web View - Xamarin Explorer
I put it on OnElementChanged method, as a result, whenever the user navigate to other page in web view, causing the url changed,...
Read more >WebView | Android Developers
Build apps that give your users seamless experiences from phones to tablets, watches, and more. ... Learn to build for your use case...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @Scriptman, currently I did something like this, but it’s far from ideal
Here is the code that is tested and allows you to add additional headers to the WebView on major platforms
Android platform will need to set WebViewHandler.PlatformViewFactory before using WebView for the first time
Usage(Can also be used with IDictionary<string, string> in MVVM):