      })
            .then(r =&gt; {
                let headers = &quot;&quot;
                for (let entry of r.headers.entries()) {
                    headers += `&lt;div class=&quot;header&quot;&gt;&lt;span&gt;${entry[0]}&lt;/span&gt; &lt;span&gt;${entry[1]}&lt;/span&gt;&lt;/div&gt;`
                }
                document.getElementById(&#39;headers&#39;).innerHTML = headers
                return r.json()
            })
            .then(result =&gt; {
                document.getElementById(&#3