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("MY API KEY" + ":" + " ")
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.fpd.v1+xml"
objHTTP.send Route
response = objHTTP.responseText
Comments
Post a Comment