title: Ajax Post request in Dojo not working
body: <p>I'm new to DOJO and following the documentation on Dojo official website i wrote my code for POST request as below. But its not working and its giving me error <strong>"Unable to load myURL status: 0"</strong>.
  Please help.</p>
  
  <pre><code> require(["dojo/request","dojo/dom","dojo/on"],function(request,dom,on){
  
      try{
  //Access TextFields Value
  var txt_UserName=dom.byId("usrName");
  var txt_Password=dom.byId("password");
  
  //Attaching click event on Button   
  on(dom.byId("loginButton"),"click",function(evt){
      //alert(txt_UserName.value);
      request.post(myURL,{
          handleAs: "json",   
          data:{
              userId: txt_UserName.value,
              password: txt_Password.value,
          },
          headers:{
              "Content-Type": "application/x-www-form-urlencoded",
          }
      }).then(function(response){
          alert(response);
      },
  
      function(error){
  
          alert(error);
      }
  );
  
  });
  
  }
  catch(error){
  
      alert(error.message);
  }});
  </code></pre>