title: Pass more than one variable to beforeSend function via $.ajax
body: <p>I have the following Ajax call:</p>
  
  <pre><code>function ajaxCall(soap, url){
      // Post SOAP request.
      $.ajax({
          type: "POST",
          url: url,
          contentType: "text/xml",
          data: soap,
          dataType: "xml",
          processData: false,
          beforeSend: passToProxy(url),
          success: onSuccess,
          error: function(){
              getRandom();
          }
      });
  }
  
  function passToProxy(xhr,url1) {
      alert(url1);
       // Pass the target URL onto the proxy.
       xhr.setRequestHeader("SOAPTarget","http://localhost:8088/mockSDClientSOAPBinding");
       // Pass the action onto the proxy.
       xhr.setRequestHeader("SOAPAction","invoke");
  }
  </code></pre>
  
  <p>I want to be able to pass the url variable to the passToProxy function (want to replace "http://localhost:8088/mockSDClientSOAPBinding" with a variable url), but I don't think I have the right idea here. The alert in passToProxy pops up "undefined." What am I doing wrong?</p>