title: HTTP POST in node-red js
body: <p>I want to know how to do a http POST request with a JSON data into some server with API key. I searched in <a href="http://nodered.org/docs/" rel="nofollow">http://nodered.org/docs/</a> But they haven't written anything clearly. The documentation is very messy and not even good to understand.
  However, I have tried to POST a JSON data which is stringified:</p>
  
  <pre><code>{"version":"1.0.1","sensors":[{"sensor":"accel","output":[{"name":"accelert","type":"dcmotion"}]}]}
  </code></pre>
  
  <p>I have written the API in function node as (API is arbitary here, not original)</p>
  
  <pre><code>var msg = {"version":"1.0.1","sensors":[{"sensor":"accel","output":[{"name":"accelert","type":"dcmotion"}]}]}
  
  msg.headers: {
                      'x-api-key': 'ucasdfeacceacxfAIH2L4=',
                      'content-type': 'application/json"
                  }
  </code></pre>
  
  <p>I got this example from here : <a href="https://groups.google.com/forum/#!msg/node-red/nl9Be0dN55g/S_VYMTjOanEJ" rel="nofollow">https://groups.google.com/forum/#!msg/node-red/nl9Be0dN55g/S_VYMTjOanEJ</a></p>
  
  <p>And I added input node as HTTP POST then given the url and connected it with function added one debug node.
  Now I deployed it. I am getting error : Unexpected token in API node</p>
  
  <p>Now I'm not sure how to do that. I am not getting how to do this. Please help me out. No tutorial available in node red site.</p>