title: HTTP POST request issue
body: <p>I am sending a HTTP POST request to PHP server using <code>HttpWebRequest</code>.
  My code works like this:</p>
  
  <pre><code>    /// &lt;summary&gt;
      /// Create Post request.
      /// &lt;/summary&gt;
      /// &lt;param name="requestUrl"&gt;Requested url.&lt;/param&gt;
      /// &lt;param name="postData"&gt;Post data.&lt;/param&gt;
      /// &lt;exception cref="RestClientException"&gt;RestClientException&lt;/exception&gt;
      /// &lt;returns&gt;Response message, can be null.&lt;/returns&gt;
      public string Post(string requestUrl, string postData)
      {
          try
          {
              //postData ends with &amp;
              postData = "username=XXX&amp;password=YYYY&amp;" + postData;
  
              byte[] data = UTF8Encoding.UTF8.GetBytes(postData);
  
              HttpWebRequest request = (HttpWebRequest)WebRequest.Create(requestUrl);
              request.Method = RequestMethod.Post.ToString().ToUpper();
              request.ContentType = "application/x-www-form-urlencoded";
              request.ContentLength = data.Length;
  
              using (Stream stream = request.GetRequestStream())
              {
                  stream.Write(data, 0, data.Length);
                  stream.Flush();
              }
  
              string responseString;
              using (WebResponse response = request.GetResponse())
              {
                  responseString = GetResponseString(response);
              }
  
              return responseString;
          }
          catch (WebException ex)
          {
              var httpResponse = (HttpWebResponse)ex.Response;
              if (httpResponse != null)
              {
                  throw new RestClientException(GetExceptionMessage(httpResponse));
              }
  
              throw;
          }
      }
  </code></pre>
  
  <p>I am experiencing wierd behaviour. Every minute I am sending like 100 requests using this. But from time to time, this request is executed withou POST data. Then my PHP server returns error (because I am checking if request is POST and if it has any POST data).</p>
  
  <p>This is a client/server communication. Computer with Windows Service application is connected to the internet using Wifi. Connection is sometimes really poor. Can this cause issue mentioned? How to make HTTP POST request secure against this behaviour.</p>