Donate. I desperately need donations to survive due to my health

Get paid by answering surveys Click here

Click here to donate

Remote/Work from Home jobs

Receiving “internal server error” on https POST request

I am trying to send a HTTP "POST" request, but when I try to send the request I get an "Internal Server error".

This is my code:

Dim xmlhttp, Route As String
If MsgBox("Would you like to convert this data? " & vbNewLine & vbNewLine & TB1, vbYesNo + vbQuestion) = vbNo Then Exit Sub
Route = TB1.Text
Set objHTTP = CreateObject("WinHttp.WinHttpRequest.5.1")
Filename = FN.Text & ".txt"
Url = "https://api.flightplandatabase.com/auto/decode"
objHTTP.Open "POST", Url, False
objHTTP.setRequestHeader "Authorization", "Basic " + Base64Encode("AWSuW39Tyn3oGe8sOiiQfD51tyEDca4bnK9OCrmG" + ":" + " ")
objHTTP.setRequestHeader "content-type", "application/json; charset=utf-8"
objHTTP.setRequestHeader "user-agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36"
objHTTP.setRequestHeader "Accept", "application/vnd.google-earth.kml+xml"
objHTTP.send Route
response = objHTTP.responseText

Comments