title: Retrieve OData using AJAX in json format, with authentication
body: <p>I need to convert this OData retrieval (using SAPUI5 libs):</p>
  
  <pre><code>var url = "http://someurl/SERVICE";
  var username = "username";
  var password = "password";
  var oModel = new sap.ui.model.odata.ODataModel(url, true, username, password);
  </code></pre>
  
  <p>into an ajax call, without using SAPUI5 libraries, mantaining the authentication:</p>
  
  <pre><code>$.ajax({
     url : "http://someurl/SERVICE?$format=json",
     type: "GET", //or POST?
     dataType: "json",
     data : {username : "username", password: "password"},
     success: function(){alert("ok")},
     error: function(){alert("error")}
  })
  </code></pre>
  
  <p>I googled a lot but I didn't find anything useful.. I don't know how can I do the authentication.</p>
  
  <p>is it possible? Any idea?</p>