Skip to content

Instantly share code, notes, and snippets.

@pschaeffer
Created November 13, 2023 05:18
Show Gist options
  • Save pschaeffer/e825de4e666069c2c0679948ee2fa841 to your computer and use it in GitHub Desktop.
Save pschaeffer/e825de4e666069c2c0679948ee2fa841 to your computer and use it in GitHub Desktop.
This gist should reproduce electron problem 40498
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Hello World!</title>
<!-- https://electronjs.org/docs/tutorial/security#csp-meta-tag -->
<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline';" />
</head>
<body>
<h1>Hello World!</h1>
We are using node ,
Chrome ,
and Electron.
<script>
let urlStr = 'https://javaproxya.dnsalias.com/HDLmInvokeApi?Name=getUser';
let apiJson = '{}';
let apiHeaders = [];
let apiPromise;
apiPromise = fetch(urlStr, {
credentials: "include",
"method": "POST",
"headers": apiHeaders,
"body": apiJson
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment