mirror of https://github.com/electron/electron
16 lines
355 B
HTML
16 lines
355 B
HTML
<html>
|
|
<body>
|
|
<script>
|
|
window.ajax = async (url, options) => {
|
|
const response = await fetch(url, options);
|
|
const data = await response.text();
|
|
const headers = {};
|
|
for (const [key, value] of response.headers.entries()) {
|
|
headers[key] = value;
|
|
}
|
|
return {data, status: response.status, headers};
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|