9;result&#39;).textContent = JSON.stringify(result, null, 4)
            })
            .catch(err =&gt; {
                let error = err.message;
                if (err.name === &quot;TypeError&quot; &amp;&amp; err.message === &quot;Failed to fetch&quot;)
                    error = &quot;CORS error: The server is not allowing cross-origin requests.&quot;

                document.getElementById(&#39;headers&#39;).innerHTML = &#39;&#39;
                document.getElementById(&#39;result&#39;).textConten