Search the Community
Showing results for tags 'HTTP POST'.
Found 2 results
Hello, I'm in the making of a script that needs to post XML data through HTTPS to our ServiceDesk Plus MSP service. I'm running into trouble because I have never made any scripts using HTTP with POST and I cannot see what I'm doing wrong here. Can someone help me or should I find help somewhere else? $URLSDP="" ;REMOVED - cannot publish this. this is the HTTPS url to our ServiceDesk $TechnicianKey="" ;REMOVED $ID="" ; Request ID $sPostData = "OPERATION_NAME=ADD_NOTE&INPUT_DATA=<Operation><Details><Notes><Note><isPublic>false</isPublic><notesText>Text added to the note</notesText></Note></Notes></Details></Operation>&format=XML" $oHTTP = ObjCreate("winhttp.winhttprequest.5.1") $oHTTP.Open("POST", $URLSDP & "/sdpapi/request/"& $ID & "/note?TECHNICIAN_KEY="& $TechnicianKey, False) $oHTTP.SetRequestHeader("Content-Type", "xml") $oHTTP.Send($sPostData) $oReceived = $oHTTP.ResponseText $oStatusCode = $oHTTP.Status ConsoleWrite($oStatusCode & @CRLF) ConsoleWrite($oReceived & @CRLF) If $oStatusCode = 200 Then ;Process the response $oReceived ;ConsoleWrite(@CRLF & "Response" & @CRLF & $oReceived & @CRLF) Else MsgBox(16, "Error " & $oStatusCode, $oReceived, 7) EndIf Response: <operation name="POST"><result><status>Failed</status><message>Invalid operation</message></result></operation>REST API guide. https://www.manageengine.com/products/service-desk-msp/help/adminguide/api/notes-operations.html#add
My friends would like to know how to use AutoIt to perform an HTTP POST request to a URL. For example in Virustotal there is a python script that does this exact action to send a url for scanning. is there a UDF that helps with this. Thank you for any help.