title: HttpWebRequest returns (400) Bad Request
body: <p>The request gives the following error: 
  The remote server returned an error: (400) Bad Request.</p>
  
  <p>I cann't find a solution on internet. Does anyone knows how to solve this?</p>
  
  <pre><code>HttpWebRequest request = (HttpWebRequest)WebRequest.Create(@"https://maps.googleapis.com/maps/api/geocode/json");
              request.ContentType = "application/x-www-form-urlencoded";
              request.Method = "POST";
              var parameters = string.Format("language={0}&amp;latlng={1}&amp;client={2}&amp;signature={3}", "nl", "51.123456,5.612345", "gme-aa", "******_******=");
  
              byte[] byteArray = Encoding.UTF8.GetBytes(parameters);
              request.ContentLength = byteArray.Length;
              Stream dataStream = request.GetRequestStream();
              dataStream.Write(byteArray, 0, byteArray.Length);
              dataStream.Close();
  
              /*
               * Read HttpWeb Response
               */
              HttpWebResponse response = (HttpWebResponse)request.GetResponse();
              dataStream = response.GetResponseStream();
              StreamReader reader = new StreamReader(dataStream);
              string Response = reader.ReadToEnd();
              response.Close();
  </code></pre>
  
  <p>EDIT:</p>
  
  <p>I'm working inside Lowcode platform Outsystems. Outsystems creates the url inside WebRequest.Create() without the paramaters. So, I have access to webRequest object and need to pass the parameters.</p>