flutter_webview_plugin icon indicating copy to clipboard operation
flutter_webview_plugin copied to clipboard

WebViewScaffold seems to ignore provided headers

Open asacic opened this issue 7 years ago • 2 comments

Hi,

when calling a URL and placing a cookie header in the webview scaffold, the request does not seem to pick up the provided header. using: flutter_webview_plugin: ^0.3.4

@override
  Widget build(BuildContext context) {
    return WebviewScaffold (
        url: this.url,
        headers: {'Cookie:' : this.cookie},
        appBar: AppBar(
            title: Text('Inhalt', style: TextStyle(color: Colors.white)),
            centerTitle: true,
            backgroundColor: Colors.lightGreen,
        ),
    );
  }

When i am setting up a classic http.get command it works perfectly fine.

var headers = {'Cookie': this.cookie};
  final response = await http.get(
      'https://someurl.com',
      headers: headers);

So the cookie seems to be fine, the header declaration also. I could not find a more comprehensive documentation on this. Maybe I am missing something.

Thanks!

asacic avatar Apr 21 '19 18:04 asacic

Same issue, any luck?

joelbrostrom avatar Jul 17 '19 14:07 joelbrostrom

Same issue

shun5nktm avatar Mar 24 '20 08:03 shun5nktm