httprequest example Get using https:// fails.

Monkey Forums/Monkey Bug Reports/httprequest example Get using https:// fails.

Paul - Taiphoz(Posted 2017) [#1]
Using the example that comes with it and building for GLFW3 it will not get anything.

It works fine in html5 tho, but I need it on Windows.


secondgear(Posted 2017) [#2]
I don't think https is supported for glfw targets. I had to run a local http->https nodejs proxy last time I needed https in Windows desktop.


Paul - Taiphoz(Posted 2017) [#3]
That sucks. I feel like I am stuck between a rock and a hardplace, If I use html5 as a target I can handle the https calls with mnet, but then I can get access to the log files, and it appears like if I use glfw I cant get access to the https walled off api. :/


marksibly(Posted 2017) [#4]
For httprequest on windows, I currently recommend using the wget.exe app - you can find it here:

https://github.com/blitz-research/monkey2/tree/master/src/ted2/bin

For linux, I recommend using 'wget' too, which is built-in to the OS (I think?).

For macos I recommend using 'curl', which is built-in to the OS.

Having to ship an exe with your app isn't ideal of course, but until I can get 'libcurl' building (and I don't know when that'll be) it's the best way to go for 'works everywhere' httprequests as it (should) deal with https, proxies, and all the the other special case weirdness involved with making httprequests.


Paul - Taiphoz(Posted 2017) [#5]
Thanks Mark I knew about wget but never thought about using it for this, that will work a treat, its not ideal but will work and thats the main thing.

thanks. Hope you can get it working in monkey soon tho, and I guess in monkey 2.


Soap(Posted 2017) [#6]
Maybe add a banana with the examples for wget on pc / linux / and curl on osx?


Paul - Taiphoz(Posted 2017) [#7]
how I'm doing wget
Function DownloadStats:Void()
		Local t:String = CurrentDir()
		t += "/data/"
		If Execute(t + "wget.exe -b -q -P data https://api.eveonline.com/map/kills.xml.aspx") = 0
			doo some shit...
		Else
			Error "oh shit"
		EndIf
End



Paul - Taiphoz(Posted 2017) [#8]
I'm doing the above but its becoming a pain in the ass as the number of calls I need to make to the API increases could really use a propper https module for good old normal monkey if anyone with the c skills wants to have at it.