title: translate Postman post Request with Basic Auth to mingw64 curl and powershell On Windows 10
body: <p>I would like to translate a POST Request test from Postman to curl on Windows!</p>
  <p>note: <code>ip</code>, <code>username</code>, <code>password</code> <em>are illustrative for this question!</em></p>
  <p><a href="https://i.stack.imgur.com/Xtfrt.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Xtfrt.png" alt="enter image description here" /></a></p>
  <p><a href="https://i.stack.imgur.com/4CkIC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4CkIC.png" alt="enter image description here" /></a></p>
  <p>Consuming from Postman, I get <code>200 OK Code</code> fine!</p>
  <p>But, Trying to use <a href="https://curl.se/windows/dl-7.74.0_2/curl-7.74.0_2-win64-mingw.zip" rel="nofollow noreferrer">curl</a> from cmd is not working!</p>
  <p>Checking on Postman the <code>curl code</code>
  <a href="https://i.stack.imgur.com/dwjg8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dwjg8.png" alt="enter image description here" /></a></p>
  <p>I was trying on Powershell</p>
  <pre><code>curl --location --request POST 'http://10.31.7.52/BdN_SMS_CXP/api/SendSMS' --header 'Authorization: Basic bWFyaWVsYTpZMFMkaSRfViZTLjQwNio=' --header 'Content-Type: application/json' --data-raw '{&quot;ANI&quot; : 3007209820}'
  
  curl --location --request POST 'http://10.31.7.52/BdN_SMS_CXP/api/SendSMS' --header 'Authorization: Basic bWFyaWVsYTpZMFMkaSRfViZTLjQwNio=' --header 'Content-Type: application/json' --data-raw '{\&quot;ANI\&quot; : 3007209820}'
  </code></pre>
  <p>checking codification/decodification is fine.</p>
  <p><a href="https://i.stack.imgur.com/1QJHy.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1QJHy.png" alt="enter image description here" /></a></p>
  <p>Now directly with user and password, according to <a href="https://stackoverflow.com/a/27442239/811293">https://stackoverflow.com/a/27442239/811293</a></p>
  <pre><code>curl --location --request POST 'http://10.31.7.52/BdN_SMS_CXP/api/SendSMS' --user 'mariela:Y0S$i$_V&amp;S.406*' --header 'Content-Type: application/json' --data-raw '{&quot;ANI&quot; : 3007209820}'
  </code></pre>
  <p>Here my results.
  <a href="https://i.stack.imgur.com/oCJ0A.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/oCJ0A.png" alt="enter image description here" /></a></p>
  <p>When I use <code>curl</code> of <code>mingw64</code> <code>7.71.1 version</code>,  the command is misinterpreted, because I get a <code>407 error</code>, <code>Authentication required</code>. It's not just a <a href="https://stackoverflow.com/q/28128918/811293">powershell problem</a> solved with <a href="http://like%20https://stackoverflow.com/a/25045154/811293" rel="nofollow noreferrer">Remove-item alias:curl</a>.</p>
  <p>I suspect you should escape some characters, and use double commas <code>&quot;</code> instead of single commas <code>'</code>.</p>
  <p><strong>What considerations should I have with <code>$</code>, <code>_</code>, <code>&amp;</code>, <code>.</code> and <code>*</code> characters (if I should have it with any)?</strong></p>
  <p><strong>How should I write the request in powershell (or mingw64 curl) for it to work?</strong></p>