title: Access ArangoDB data from browser
body: <p>I want to get access to JSON data from arangoDB, which I installed locally from the browser (own interface). I get the "401 Unauthorized" request, how can I fix this?</p>
  
  <pre><code>function getRequest(){ 
      alert("test")
      var request = new XMLHttpRequest();
      request.open("GET","http://root@localhost:8529/_db/_system/_api/document/FC_ACTUAL_SALES/945545",true);
      request.setRequestHeader('Content-Type','application/json');
      request.setRequestHeader('Access-Control-Allow-Credential','true');
      request.responseType = 'json';
      request.addEventListener('load', function(event) {    
          if (request.status &gt;= 200 &amp;&amp; request.status &lt; 300) {
              console.log(request.responseText);    
          } else {
              console.warn(request.statusText, request.responseText);    
          }
      });
      request.send();
  }
  </code></pre>