title: Node-red set get http request parameters
body: <p>With Node-Red, I'm trying to set the right parameters for http request, but I'm not able to do it.</p>
  
  <p><a href="https://i.stack.imgur.com/7o6at.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7o6at.png" alt="the block used"></a></p>
  
  <p><a href="https://i.stack.imgur.com/Wb6vZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Wb6vZ.png" alt="Function code"></a></p>
  
  <p><a href="https://i.stack.imgur.com/uGRqC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uGRqC.png" alt="Http request setting"></a></p>
  
  <p>The query with curl is this:</p>
  
  <pre><code>curl -H "Content-Type: application/json" -X GET -d '{"auth_key":"xf79rra", "payload":null}' https://retepaiot.it/sensordata/0018b1213
  </code></pre>
  
  <p>and it works.</p>
  
  <p>I think I've made somethings wrong passing auth_key and payload (they are not URL parameters).
  I use the function to prepare the message:</p>
  
  <pre><code>msg.headers = {    
      "Content-Type": "application/json"
      };
  
  
  msg.payload = {auth_key:"xf7xxxx9rra", 
      payload:null};
  return msg;
  </code></pre>
  
  <p>and http request for URL:</p>
  
  <pre><code>https://retepaiot.it/sensordata/001xxxx1213
  </code></pre>
  
  <p>the returned message is:</p>
  
  <pre><code>{ "message": "Failed to decode JSON object: Expecting value: line 1 column 1 (char 0)"}
  </code></pre>