title: how do i turn this $.ajax request into a WebClient execution
body: <ul>
  <li>I have a page called:  tar-url.com</li>
  <li>I want to ping target page with a PUT request viai C#.</li>
  <li>I want to return a Success or Error to client.</li>
  </ul>
  
  <p>This exists and works with all clients NOT IE.</p>
  
  <pre><code>    var xml = "[XMLDOC]";
      $.ajax({
          type: "PUT",
          contentType: "multipart-form",
          url: "tar-url.com",
          headers: {Authorization: "Basic herpderp="},
          data: xml
          success: function(){console.log("success");},
          error: function(){console.log("error");}
      });
  </code></pre>
  
  <p>This is the request i normally do.  It works in my old format, but there is 1 hitch, it doesnt work in IE9,  SO i came up with this brilliant idea;  Have my server do it, not the browser.</p>
  
  <p>I create a Generic Handler:  <em>gHand.ashx</em> which allows me to carry out my calls.</p>
  
  <p>I do this for some other calls, but it is simple GET requests, that return some JSON.  Here is where i need help.</p>
  
  <p>I create my method as given in C#:</p>
  
  <pre><code>public void ProcessRequest(HttpContext context)
  {
      WebClient wsb = new WebClient();
      //pass *tar-url.com here*.
      string url = context.Request.QueryString["url"];
      //pass contentType here.
      string ct = context.Request.QueryString["contextType"];
      string type = context.Request.QueryString["type"];
      string headers = context.Request.QueryString["headers"];
      //not sure how to access the xml?
      // something like this?
      string xml = context.Request.QueryString["save"];
  
      //HERE I NEED TO ASSIGN REST OF STUFF TO *wsg*
  
      string response = wsb.DownloadString(url);
      context.Response.Write(response);
  
  }
  </code></pre>
  
  <p>How i Call it in javascript:</p>
  
  <pre><code>$.ajax({
      url:"gHand.ashx",
      type: "get",
      data: JSON.stringify({
          save: xml,
          type: "PUT",
          url: "tar-url.com",
          contentType: "multipart/form",
          headers:{ Authorization: "Basic HerpDerp="}
      }),
      success: function(){...},
      error: function(){...}
  });
  </code></pre>
  
  <p>My calls are all seeming to be correct in the sense that i can build a WebClient and execute similar scripts, but it seems that this particular set up boggles my mind.</p>
  
  <p><strong>Edit:</strong>  Has anyone any idea?</p>