title: How to send form data or multipart request in InAppWebView flutter?
body: <p>I'm trying to integrate the AADHAR API in my flutter application.</p>
  <p>To work with the api I have used <strong>InAppWebView</strong> plugin in the application.</p>
  <blockquote>
  <p>For more details I have shared below my code:</p>
  </blockquote>
  <pre><code>class AaadharWebView extends StatelessWidget {
    AaadharWebView(
        {Key? key, required this.targetUrl, required this.requestPayload})
        : super(key: key);
    final String targetUrl;
    final String requestPayload;
  
    final AppStateController _appState = Get.find&lt;AppStateController&gt;();
    InAppWebViewController? webViewController;
  
    @override
    Widget build(BuildContext context) {
      Uint8List payload = Uint8List.fromList(utf8.encode(&quot;msg:$requestPayload&quot;));
      return Scaffold(
        appBar: AppBar(title: const Text(&quot;Aadhar Linking&quot;)),
        body: InAppWebView(
          initialUrlRequest: URLRequest(
              url: Uri.parse(targetUrl),
              method: 'POST',
              body: payload,
              headers: {
                'Content-Type': 'multipart/form-data',
                'Content-Length': payload.length.toString(),
              },
              ),
          onWebViewCreated: (controller) async {
            webViewController = controller;
            webViewController?.clearCache();
          },
        ),
      );
    }
  }
  </code></pre>
  <p>Here,
  <strong>requestPayload</strong> =&gt; contains the valid XML format
  <strong>targetUrl</strong> =&gt; contains the valid URL</p>
  <p>Please do not bother about the correct data in above 2 fields. Those contains the valid data.</p>
  <p>I have tested this with the help of POSTMAN. And I got the expected result. Under the hood <strong>Postman</strong> uses <strong>http.MultipartRequest</strong>. But in our case <strong>InAppWebView</strong> takes the UInt8List type of data only.</p>
  <blockquote>
  <p>Response: Please see the below image</p>
  </blockquote>
  <p><a href="https://i.stack.imgur.com/HjS87.png" rel="nofollow noreferrer">NSDL WebPage ScreenShot</a></p>
  <p>Can anyone please help me, How can I send form data or multipart request in InAppWebView flutter?</p>