title: curl on Windows 10: "invalid character in header"
body: <p>I am trying to use the curl example below on Windows 10 from <a href="https://developers.home-assistant.io/docs/external_api_rest/" rel="nofollow noreferrer">REST API Home Assistant Developer Docs</a>.</p>
  
  <pre class="lang-json prettyprint-override"><code>curl -X POST -H "Authorization: Bearer ABCDEFGH" \
         -H "Content-Type: application/json" \
         -d '{"entity_id": "switch.christmas_lights"}' \
         http://localhost:8123/api/services/switch/turn_on
  </code></pre>
  
  <p>Below, is my actual command-line (escaping the double-quotes for Windows):</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>curl -X POST -H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiI5OTc5ZDUwZjA2MDk0YmQ1YTBkYjkyYmQ5MjEyYWZkNyIsImlhdCI6MTU4Nzc5MzI4NywiZXhwIjoxOTAzMTUzMjg3fQ.8sjGRXL1spXguuRnp795049zdCFcOtraCiDjC61UkWQ" -H "{\"Content-Type: application/json\"}" -d "{\"entity_id\": \"light.media_room_light\"}" http://homeassistant.local:8123/api/services/switch/turn_on</code></pre>
  </div>
  </div>
  </p>
  
  <p>It responds with the below error message.  I'm using the curl.exe I downloaded from </p>
  
  <p><code>invalid character in header</code></p>
  
  <p>I downloaded <strong>curl.exe</strong> from: 
  <a href="http://%20%20%20%20https://curl.haxx.se/windows/" rel="nofollow noreferrer">    https://curl.haxx.se/windows/</a></p>