title: Xamarin.Forms: How to add custom HTTP headers in WebView (all requests + css + js)?
body: <p>I already did this with custom WebViewRender and MyWebViewClient, but I think that it can be done better for iOS and Android.
  I will appreciate any help. If this can be made easier with only the help of the PCL (Xamarin.Forms)
  Thanks!</p>
  
  <pre><code>public class WebViewRender : WebViewRenderer
  {
      protected override void OnElementChanged(ElementChangedEventArgs&lt;WebView&gt; e)
      {
          base.OnElementChanged(e);
          if (Control != null)
          {
              var webView = Control as Android.Webkit.WebView;
              Dictionary&lt;string, string&gt; headers = new Dictionary&lt;string, string&gt;
              {
                  ["Name"] = "value"
              };
              webView.SetWebViewClient(new MyWebViewClient());
              webView.LoadUrl(Control.Url, headers);
          }
      }
  }
  public class MyWebViewClient : WebViewClient
  {
      public override bool ShouldOverrideUrlLoading(Android.Webkit.WebView view, string url)
      {
          Dictionary&lt;string, string&gt; headers = new Dictionary&lt;string, string&gt;
          {
              ["Name"] = "value"
          };
          view.LoadUrl(url, headers);
          return true;
      }
  }
  </code></pre>