Próba wysłania żądania JSON POST do interfejsu API HTTP (PushBullet). Ale w obliczu błędu w kodzie. Każda pomoc doceniona. Reference to the document to send push notificationJak przesłać dane JSON przez HTTP API używając VBScript?
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 <api secret id>"
objXmlHttpMain.setRequestHeader "Content-Type", "application/json"
objXmlHttpMain.send strJSONToSend
set objJSONDoc = nothing
set objResult = nothing
Wielkie dzięki, które zadziałało! Przepraszam, jestem bardzo nowy w vbscript! –