title: How to retrieve XHR response code (+timestamp) of AMD'ized Dojo?
body: <p>With the "old" Dojo one could pass a second argument <code>ioargs</code> to the <code>load</code> function of a Xhr request (<a href="http://dojotoolkit.org/reference-guide/1.8/dojo/xhrGet.html#dojo-xhrget" rel="nofollow noreferrer">see Example 6 here</a>). This <code>ioargs</code> provided (among other things) the timestamp and status code of the request.</p>
  
  <p>But how can I achieve this with the new and "cleaner" (and forward compatible) Dojo?<br>
  Unfortunately, I could not find any hints in the <a href="http://dojotoolkit.org/reference-guide/1.8/dojo/request/xhr.html#id5" rel="nofollow noreferrer">current documentation</a>.</p>
  
  <p>The following should be a port of above referenced example to the "new" Dojo. But, <code>ioargs</code> will be undefined:</p>
  
  <pre class="lang-js prettyprint-override"><code>require( "dojo/request/xhr", "dojo/dom", "dojo/domReady!",
    function(request, dom){
      // Look up the node we'll stick the text under.
      var targetNode = dom.byId("getLicenseStatus");
  
      // The parameters to pass to xhrGet, the url, how to handle it, and the callbacks.
      request.get(
        "{{dataUrl}}dojo/LICENSE",
        {
          handleAs: "text",
          preventCache: true
        }
      ).then(
        function(data, ioargs){
          // FIXME: ioargs is undefined
          targetNode.innerHTML = "XHR returned HTTP status: " + ioargs.xhr.status;
        },
        function(error){
          targetNode.innerHTML = "An unexpected error occurred: " + error.response.status + ": " + error.response.text;
        }
      );
    }
  );
  </code></pre>
  
  <p>What do I need to change to have the request's timestamp and status code available in the load function?</p>