https:// httprequest?

Monkey Forums/Monkey Programming/https:// httprequest?

Paul - Taiphoz(Posted 2017) [#1]
So the request does not like HttpRequest( "GET","https:// anyone know how to get this working ?

I'm getting xml from an online api or trying to at least. I was using Mnet which is fine but I want to make the final version Windows Application and I guess Mnet does not support it ? or iv got an out of date module.?


Paul - Taiphoz(Posted 2017) [#2]
I updated mnet, when I try and build the example for GLFW3 I get the following error.

I had a serious pc crash and lost years of code as a result new harddrive and fresh install of Windows 10 so there is a good chance I am missing something stupid, but cant think what it might be, I have Ming installed, have the other sdk's installed as well, also have vc installed..

hope some one can help.


TRANS monkey compiler V1.87
Parsing...
Semanting...
Translating...
Building...
gcc  -m32  -O3 -DNDEBUG -Wno-free-nonheap-object -I../glfw3/include -I../glfw3/src -I../openal/include -I../stb -I../zlib-1.2.8 -I../lpng1610 -c -o build/Release32/context.o ../glfw3/src/context.c
gcc  -m32  -O3 -DNDEBUG -Wno-free-nonheap-object -I../glfw3/include -I../glfw3/src -I../openal/include -I../stb -I../zlib-1.2.8 -I../lpng1610 -c -o build/Release32/init.o ../glfw3/src/init.c
gcc  -m32  -O3 -DNDEBUG -Wno-free-nonheap-object -I../glfw3/include -I../glfw3/src -I../openal/include -I../stb -I../zlib-1.2.8 -I../lpng1610 -c -o build/Release32/input.o ../glfw3/src/input.c
gcc  -m32  -O3 -DNDEBUG -Wno-free-nonheap-object -I../glfw3/include -I../glfw3/src -I../openal/include -I../stb -I../zlib-1.2.8 -I../lpng1610 -c -o build/Release32/monitor.o ../glfw3/src/monitor.c
gcc  -m32  -O3 -DNDEBUG -Wno-free-nonheap-object -I../glfw3/include -I../glfw3/src -I../openal/include -I../stb -I../zlib-1.2.8 -I../lpng1610 -c -o build/Release32/wgl_context.o ../glfw3/src/wgl_context.c
gcc  -m32  -O3 -DNDEBUG -Wno-free-nonheap-object -I../glfw3/include -I../glfw3/src -I../openal/include -I../stb -I../zlib-1.2.8 -I../lpng1610 -c -o build/Release32/win32_init.o ../glfw3/src/win32_init.c
gcc  -m32  -O3 -DNDEBUG -Wno-free-nonheap-object -I../glfw3/include -I../glfw3/src -I../openal/include -I../stb -I../zlib-1.2.8 -I../lpng1610 -c -o build/Release32/win32_monitor.o ../glfw3/src/win32_monitor.c
gcc  -m32  -O3 -DNDEBUG -Wno-free-nonheap-object -I../glfw3/include -I../glfw3/src -I../openal/include -I../stb -I../zlib-1.2.8 -I../lpng1610 -c -o build/Release32/win32_time.o ../glfw3/src/win32_time.c
gcc  -m32  -O3 -DNDEBUG -Wno-free-nonheap-object -I../glfw3/include -I../glfw3/src -I../openal/include -I../stb -I../zlib-1.2.8 -I../lpng1610 -c -o build/Release32/win32_tls.o ../glfw3/src/win32_tls.c
gcc  -m32  -O3 -DNDEBUG -Wno-free-nonheap-object -I../glfw3/include -I../glfw3/src -I../openal/include -I../stb -I../zlib-1.2.8 -I../lpng1610 -c -o build/Release32/win32_window.o ../glfw3/src/win32_window.c
gcc  -m32  -O3 -DNDEBUG -Wno-free-nonheap-object -I../glfw3/include -I../glfw3/src -I../openal/include -I../stb -I../zlib-1.2.8 -I../lpng1610 -c -o build/Release32/window.o ../glfw3/src/window.c
gcc  -m32  -O3 -DNDEBUG -Wno-free-nonheap-object -I../glfw3/include -I../glfw3/src -I../openal/include -I../stb -I../zlib-1.2.8 -I../lpng1610 -c -o build/Release32/winmm_joystick.o ../glfw3/src/winmm_joystick.c
gcc  -m32  -O3 -DNDEBUG -Wno-free-nonheap-object -I../glfw3/include -I../glfw3/src -I../openal/include -I../stb -I../zlib-1.2.8 -I../lpng1610 -c -o build/Release32/stb_vorbis.o ../stb/stb_vorbis.c
gcc  -m32  -O3 -DNDEBUG -Wno-free-nonheap-object -I../glfw3/include -I../glfw3/src -I../openal/include -I../stb -I../zlib-1.2.8 -I../lpng1610 -c -o build/Release32/stb_image.o ../stb/stb_image.c
g++  -m32  -O3 -DNDEBUG -Wno-free-nonheap-object -I../glfw3/include -I../glfw3/src -I../openal/include -I../stb -I../zlib-1.2.8 -I../lpng1610 -c -o build/Release32/main.o ../main.cpp
../main.cpp: In static member function 'static long int MNet_Socket::Init()':
../main.cpp:4423:35: error: 'Print' was not declared in this scope
       Print( "WSAStartup failed!" );
                                   ^
../main.cpp: In static member function 'static long int MNet_Socket::CreateServer(int)':
../main.cpp:4437:18: error: 'Print' was not declared in this scope
       Print( err );
                  ^
../main.cpp:4450:18: error: 'Print' was not declared in this scope
       Print( err );
                  ^
../main.cpp:4460:18: error: 'Print' was not declared in this scope
       Print( err );
                  ^
../main.cpp: In static member function 'static void MNet_Socket::UpdateServer()':
../main.cpp:4476:48: error: 'Print' was not declared in this scope
       Print( "Received connection from client" );
                                                ^
../main.cpp:4494:20: error: 'Print' was not declared in this scope
         Print( err );
                    ^
../main.cpp: In static member function 'static long int MNet_Socket::ConnectToServer(String, int)':
../main.cpp:4551:18: error: 'Print' was not declared in this scope
       Print( err );
                  ^
../main.cpp:4561:47: error: 'Print' was not declared in this scope
       Print( "Error while resolving hostname" );
                                               ^
../main.cpp: In static member function 'static int MNet_Socket::IsConnected()':
../main.cpp:4603:36: error: 'Print' was not declared in this scope
       Print( "Connection time out" );
                                    ^
../main.cpp: In static member function 'static String MNet_Socket::Receive()':
../main.cpp:4623:29: error: 'Print' was not declared in this scope
       Print( "Disconnected" );
                             ^
../main.cpp: At global scope:
../main.cpp:4675:2: error: 'MNet_Http' does not name a type
  MNet_Http* m_ht;
  ^
../main.cpp: In constructor 'c_TestApp::c_TestApp()':
../main.cpp:4958:2: error: 'm_ht' was not declared in this scope
  m_ht=0;
  ^
../main.cpp: In member function 'virtual int c_TestApp::p_OnCreate()':
../main.cpp:4967:12: error: 'm_ht' was not declared in this scope
  gc_assign(m_ht,(new MNet_Http));
            ^
../main.cpp:4967:22: error: expected type-specifier before 'MNet_Http'
  gc_assign(m_ht,(new MNet_Http));
                      ^
../main.cpp:4967:22: error: expected ')' before 'MNet_Http'
../main.cpp: In member function 'virtual void c_TestApp::mark()':
../main.cpp:4990:12: error: 'm_ht' was not declared in this scope
  gc_mark_q(m_ht);
            ^
mingw32-make: *** [build/Release32/main.o] Error 1
Makefile:55: recipe for target 'build/Release32/main.o' failed
TRANS FAILED: Error executing 'mingw32-make CCOPTS=" -m32  -O3 -DNDEBUG" LDOPTS=" -m32 " OUT="Release32/MonkeyGame"', return code=2



Xaron(Posted 2017) [#3]
Well mnet was done before Mark came up with an official network support. Https should actually work out of the box.


Paul - Taiphoz(Posted 2017) [#4]
I'v now tried mnet , marks and another that I found and either they compile but dont get data in marks case or they dont compile with a ton of errors.

would some one mind trying to build the mnet example for glfw3 pls and let me know if it works? I'm still not sure if its me missing some library or if its actually something with mnet as I mentioned iv got a fresh install of windows 10 so there is a good chance I am missing something I need but just dont know what it is.

Also whats needed to see glfw2 as a target ? since I dont see it I guess that's for windows 7 etc? or was it deprecated.