title: Converting dojo.xhrGet to dojo/request/xhr for Struts2
body: <p>I have the following code which passes the <code>code</code> and <code>objectIds</code> to <code>trailDesignations.action</code> correctly.</p>
  
  <pre><code>            UpdateTrailDesignationGridClass = function(){
              this.updateTrailDesignationGrid = function(){
  
                  var value1 = 35;
                  var xhrArgs = {
                          url: "/trails/trailDesignations.action",
                          handleAs: "text",
                          preventCache: true,
                          content: {
                              code: value1,
                              objectIds: "35.36"
                          },
                          load: function(data){
                              featureResultsContent.innerHTML = data;
                          },
                          error: function(error){
                              featureResultsContent.innerHTML = "An unexpected error occurred: " + error;
                          }
                  };
  
                  // Call the asynchronous xhrGet
                  var deferred = dojo.xhrGet(xhrArgs);
  
              };
          };
  </code></pre>
  
  <p>But since <code>xhrGet</code> is deprecated I am trying to do the same thing with <code>dojo/request/xhr</code> using the following code.</p>
  
  <pre><code>        UpdateTrailDesignationGridClass = function(){
              this.updateTrailDesignationGrid = function(){
                  var value1 = 35;
                  xhr("/trails/trailDesignations.action",{
                      data:{
                          code: value1,
                          objectIds: "35.36"
                      },
                      preventCache: true
  
                  }).then(function(data){
                      featureResultsContent.innerHTML = data;
                  },function(err){
                      featureResultsContent.innerHTML = "An unexpected error occurred: " + error;
                  });
  
              };
          };
  </code></pre>
  
  <p>With the new code the data is not passed to the <code>code</code> and <code>objectIds</code> fields.  I used the same Struts action in both cases.</p>
  
  <pre><code>        &lt;action name="trailDesignations" class="gov.mo.dnr.tis.map.TrailDesignations"&gt;
          &lt;result name="success" type="stream"&gt;
              &lt;param name="contentType"&gt;text/html&lt;/param&gt;
              &lt;param name="inputName"&gt;inputStream&lt;/param&gt;
          &lt;/result&gt;
      &lt;/action&gt;   
  </code></pre>
  
  <p>I did get information back from <code>trailDesignations.action</code>.</p>