summaryrefslogtreecommitdiffstats
path: root/tests/auto/core/origins/resources/fetchApi.html
blob: 7b54416fd0d2b55ea9b5278c2a870511397f04c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<!doctype html>
<html>
<body>
    <script type="text/javascript">
        const queryString = window.location.search;
        const urlParams = new URLSearchParams(queryString);
        const url = urlParams.get('url');
        const f = fetch(url);
        if (urlParams.get('printRes') == 'true') {
            f.then((r) => r.text()).then((p) => console.log(p));
        }
    </script>
</body>
</html>