title: How to add below request body (string) in Postman using http client?
body: <p><a href="https://i.stack.imgur.com/E28LI.png" rel="nofollow noreferrer">Postman Post call Screenshot</a></p>
  <p>Hi Below is my current code:</p>
  <pre><code>       var url = &quot;https://localhost:44332/token&quot;;
         var login = new Login()
          {
              username = &quot;test@gmail.com&quot;,
              password = &quot;Password@1&quot;,
              grant_type = &quot;password&quot;
          };
  
  
          using (var client = new HttpClient())
          {              
  
              httpResponseMessage = await client.PostAsJsonAsync(url, login);             
  
              if (httpResponseMessage.IsSuccessStatusCode)
              {
                  var token = httpResponseMessage.Content.ReadAsStringAsync();                  
              }
          }
  </code></pre>
  <p>My error is that 400: Bad Request, whenever i make the API call.
  If i use postman, its working,
  The following is what i put in POSTMAN body:
  &quot;username=test@gmail.com&amp;password=Password@1&amp;grant_type=password&quot;</p>
  <p>Many Thanks in advance if anyone can correct me!</p>