Switched the fetch request to state.json to use HTTPS to avoid uneeded redirects.

This commit is contained in:
moosecrab 2020-06-27 01:39:07 -07:00
parent 83c6c681ca
commit f23ef8ad91

View File

@ -2,7 +2,7 @@
'Seconds between updates 'Seconds between updates
Const updatedelay = 2 Const updatedelay = 2
Const version As String = "1.10" Const version As String = "1.11"
Const downloadurl As String = "https://long-cat.net/projects/pepperbet/pepperbet.exe?v=" & version Const downloadurl As String = "https://long-cat.net/projects/pepperbet/pepperbet.exe?v=" & version
Const versionurl As String = "https://long-cat.net/projects/pepperbet/version.txt?v=" & version Const versionurl As String = "https://long-cat.net/projects/pepperbet/version.txt?v=" & version
Const dbfilename As String = "pepperdata.xml" Const dbfilename As String = "pepperdata.xml"
@ -116,7 +116,7 @@
While xdoc Is Nothing While xdoc Is Nothing
Try Try
xdoc = Newtonsoft.Json.JsonConvert.DeserializeXmlNode(wc.DownloadString("http://www.saltybet.com/state.json"), "saltybet") xdoc = Newtonsoft.Json.JsonConvert.DeserializeXmlNode(wc.DownloadString("https://www.saltybet.com/state.json"), "saltybet")
Catch ex As Exception Catch ex As Exception
xdoc = Nothing xdoc = Nothing
System.Threading.Thread.Sleep(1500) System.Threading.Thread.Sleep(1500)
@ -130,7 +130,7 @@
If Not bootstrap Then 'dont reload state.json if we're in bootstrap mode If Not bootstrap Then 'dont reload state.json if we're in bootstrap mode
Try Try
xdoc = Newtonsoft.Json.JsonConvert.DeserializeXmlNode(wc.DownloadString("http://www.saltybet.com/state.json"), "saltybet") xdoc = Newtonsoft.Json.JsonConvert.DeserializeXmlNode(wc.DownloadString("https://www.saltybet.com/state.json"), "saltybet")
Catch ex As Exception Catch ex As Exception
xdoc = Nothing xdoc = Nothing
End Try End Try