title: Reusing WebClient object to send another HTTP request
body: <p>Can anyone explain me, why I can't reuse WebClient object to send another HTTP POST request?</p>
  
  <p>This code <strong>doesn't work</strong>:</p>
  
  <pre><code>var client = new WebClient();
  client.Headers[HttpRequestHeader.ContentType] = "application/x-www-form-urlencoded";
  string buySmsNumberResult = client.UploadString(ApiBuyUrl, apiBuyParams); //it works fine
  
  //but when I try to send another HTTP POST with the existing WebClient object
  string updateSmsNumberResult = client.UploadString(ApiUpdateNumberUrl, apiUpdateParams);
  //it throws the exception
  </code></pre>
  
  <p>Exception is:</p>
  
  <blockquote>
    <p>The remote server returned an error: (400) Bad Request.</p>
  </blockquote>
  
  <p>But if I recreate WebClient object before the second HTTP POST, it works without any issues.</p>
  
  <p>This <strong>code works</strong>.</p>
  
  <pre><code>var client = new WebClient();
  client.Headers[HttpRequestHeader.ContentType] = "application/x-www-form-urlencoded";
  string buySmsNumberResult = client.UploadString(ApiBuyUrl, apiBuyParams); 
  
  //recreating of the WebCLient object
  client = new WebClient();
  client.Headers[HttpRequestHeader.ContentType] = "application/x-www-form-urlencoded";
  string updateSmsNumberResult= client.UploadString(ApiUpdateNumberUrl, apiUpdateParams);
  </code></pre>
  
  <p>The API, which I'm using there - this is <a href="https://docs.nexmo.com/" rel="nofollow noreferrer">Nexmo API</a>.</p>
  
  <p>Thanks.</p>