08-05-2018, 07:08 AM
Hi Dean, 
This is some VBA code to post a message to CQC HTTP listener. 
I have a similar routine sent from a Raspberry Pi device that works as expected. In the case above, CQC is not receiving the postData string even though I know it's receiving the HTTP Post. I have a log set up to monitor it.
Is there something you can see that would prevent the receipt of the postData?
Quote:Sub SendPostToCQCTest()
Dim Result As String, status As String
Dim myURL As String, postData As String
Dim winHttpReq As Object
Set winHttpReq = CreateObject("WinHttp.WinHttpRequest.5.1")
 
myURL = "http://10.0.1.8:45822/TOSmessage"
postData = "a=15.2"
winHttpReq.Open "POST", myURL, False
winHttpReq.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
winHttpReq.Send postData
Result = winHttpReq.responseText
status = winHttpReq.status
End Sub
This is some VBA code to post a message to CQC HTTP listener. 
I have a similar routine sent from a Raspberry Pi device that works as expected. In the case above, CQC is not receiving the postData string even though I know it's receiving the HTTP Post. I have a log set up to monitor it.
Is there something you can see that would prevent the receipt of the postData?