title: How to POST JSON Data via HTTP API using VBScript?
body: <p>Trying to Send JSON POST Request to an HTTP API(PushBullet). But facing error in the code. Any help appreciated. <a href="https://docs.pushbullet.com/v2/pushes/" rel="noreferrer">Reference to the document to send push notification</a> </p>
  
  <pre><code>Dim objXmlHttpMain , URL
  
  strJSONToSend = {"type": "note", "title": "Alert", "body": "Lorem Ipsum Lorem Ipsum Lorem Ipsum."}
  
  URL="https://api.pushbullet.com/v2/pushes" 
  Set objXmlHttpMain = CreateObject("Msxml2.ServerXMLHTTP") 
  on error resume next 
  objXmlHttpMain.open "POST",URL, False 
  objXmlHttpMain.setRequestHeader "Authorization", "Bearer &lt;api secret id&gt;"
  objXmlHttpMain.setRequestHeader "Content-Type", "application/json"
  
  
  objXmlHttpMain.send strJSONToSend
  
  set objJSONDoc = nothing 
  set objResult = nothing
  </code></pre>