title: The remote server returned an error (400) Bad Request, status ProtocolError
body: <p>I couldn't find the solution in the other similar questions. 
  I am getting The remote server returned an error: (400) Bad Request error while running the following code.</p>
  
  <pre><code>string url = @"http://api.dwaybill.com/" + cid + 
                 "/orders.json?v=" + version + "&amp;key=" + key + 
                 "&amp;customer_number=" + customer_number + 
                 "&amp;password=" + password;
  
  HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
  UTF8Encoding encoding = new UTF8Encoding();
  
  byte[] bytes1 = encoding.GetBytes(@"{"Here is the json text that i testet and is correct"}");
  
  request.Method = "POST";
  request.ContentType = "application/json";
  request.ContentLength = bytes1.Length;
  
  using (Stream sendStream = request.GetRequestStream())
  {
      sendStream.Write(bytes1, 0, bytes1.Length);
  }
  using (HttpWebResponse response = (HttpWebResponse)request.GetResponse())
  {
      using (Stream stream = response.GetResponseStream())
      {
          using (StreamReader reader = new StreamReader(stream))
          {
              html = reader.ReadToEnd();
          }
      }
  }
  Console.WriteLine(html);
  </code></pre>
  
  <p>While getting the response via <code>(HttpWebResponse response = (HttpWebResponse)request.GetResponse())</code>, I am getting <strong>400 Bad Request</strong> error.</p>
  
  <p>How can I solve this problem? What should I do?</p>
  
  <p>edit: this is the API that Im trying to make a post request: <a href="https://github.com/digwaybill/Digital-Waybill-API" rel="nofollow noreferrer">https://github.com/digwaybill/Digital-Waybill-API</a> </p>