0

I want to add multiple headers in my controller.LoadRequest in flutter

_controller.loadRequest(
      Uri.dataFromString(fileHtmlContents,mimeType: 'text/html', encoding: Encoding.getByName('utf-8')),
      headers: {
        "name":"xxxx",
        "value":"xxxxx",
        "name":"yyyy",//I WANT TO ADD 2 HEADERS İN HERE 
        "value":"yyyy"//  
      }
    );

first header gets name and value and second header gets same but it didnt works

please help ı dont know what can ı do

1 Answer 1

0

Looking at the documentation for webview_flutter:

Currently, setting custom headers when making a post request with the WebViewController's loadRequest method is not supported on Android. If you require this functionality, a workaround is to make the request manually, and then load the response data using loadHtmlString instead.

I am assuming that this is your use case (you did not provide all of the details).

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.