title: Post Method in Power BI
body: <p>I wrote Power query to post method like follows</p>
  
  <pre><code>  let
      url = "https://XXXXXXXXXX/OAuth/Token",
      body = "{
                ""grant_type"": ""password"",
                ""client_id"": ""XXXXXXXX"",
                ""client_secret"": ""XXXXXXXXX"",
                ""redirect_uri"": ""https://XXXXXXX/home/"",
                ""username"": ""user"",
                ""password"": ""password""
  
      }",
     Source  = Json.Document(Web.Contents(url,
     [ 
       Headers = [#"Content-Type"="application/x-www-form-urlencoded"],
       Content=Text.ToBinary(body)
     ]
     )
     ),
      #"Converted to Table" = Record.ToTable(Source)
  in
     #"Converted to Table"
  </code></pre>
  
  <p>But iam getting 400 bad request error like </p>
  
  <pre><code>DataSource.Error: Web.Contents failed to get contents from 'https://XXXXX/OAuth/Token' (400): Bad Request
  Details:
      DataSourceKind=Web
      DataSourcePath=https://XXXXXXX/OAuth/Token
      Url=https://XXXXXXXXXX/OAuth/Token
  </code></pre>
  
  <p>When I tried using postman I am getting 200 Ok status . Whats the main error in my PQL code?</p>