B4J Question B4J console App trouble

georgelbs

Member
Licensed User
Longtime User
I have a console B4J app that send a simple request, to run a shell at the server side, It's works from B4A app and B4J Ui app, but not from the B4J console App, with the same code. I´ve tried with jhttputils2 and okhttputils2_NONUI, simply no error, but nothing happens.

Sub AppStart (Args() As String)
Dim link As String = "http://192.168.1.1:17180/sync"
Dim j As HttpJob
Dim nothing() As Byte
j.Initialize("sync", Me)
j.PostBytes(link & "?type=file&name=", nothing)
End Sub
 

Daestrum

Expert
Licensed User
Longtime User
After this line
B4X:
j.PostBytes(link & "?type=file&name=", nothing)

Your app will terminate - think you need add after it StartMessageLoop and then StopMessageLoop in the JobDone sub
 
Last edited:
Upvote 0
Top