How to add header to this ajax request
<p>I would like to add a header to the following request but unsure how to add it?</p>
<pre><code>&quot;Accept&quot;:&quot;application/json; odata=verbose&quot;;
</code></pre>
<p>Here is my code:</p>
<pre><code>function getArticleList() {
        var ajax = new XMLHttpRequest();
        ajax.open(&quot;GET&quot;, &quot;/content/_api/web/lists/getbytitle('topsupportarticles')/items?&quot;, true);
        ajax.onload = function () {
            var list = JSON.parse(ajax.responseText).map(function (i) { return i.Title + &quot;&lt;p id='dt'&gt;-&quot; + i.KBID + &quot;&lt;/p&gt;&quot;; });
            console.log(i.Title + &quot;  &quot; + i.KBID);
            //new Awesomplete(document.querySelector(&quot;#Title_fa564e0f-0c70-4ab9-b863-0177e6ddd247_$TextField&quot;), { list: list });

            // $(&quot;.input-loader&quot;).css(&quot;background-image&quot;, &quot;none&quot;);
        };
        ajax.send();
    }
</code></pre>