File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,17 +35,16 @@ We also propose adding a CreateWebResourceRequest API to [CoreWebView2Environmen
3535 UTF8Encoding utfEncoding = new UTF8Encoding();
3636 byte[] postData = utfEncoding.GetBytes("input=Hello");
3737
38- using (MemoryStream postDataStream = new MemoryStream(postData.Length))
39- {
40- postDataStream.Write(postData, 0, postData.Length);
41- CoreWebView2WebResourceRequest webResourceRequest =
42- environment.CreateWebResourceRequest(
43- "https://www.w3schools.com/action_page.php",
44- "POST",
45- postDataStream,
46- "Content-Type: application/x-www-form-urlencoded");
47- webView.CoreWebView2.NavigateWithWebResourceRequest(webResourceRequest);
48- }
38+ MemoryStream postDataStream = new MemoryStream(postData.Length);
39+ postDataStream.Write(postData, 0, postData.Length);
40+ CoreWebView2WebResourceRequest webResourceRequest =
41+ environment.CreateWebResourceRequest(
42+ "https://www.w3schools.com/action_page.php",
43+ "POST",
44+ postDataStream,
45+ "Content-Type: application/x-www-form-urlencoded");
46+ webView.CoreWebView2.NavigateWithWebResourceRequest(webResourceRequest);
47+
4948```
5049
5150# Remarks
You can’t perform that action at this time.
0 commit comments