#Region Project Attributes
#MainFormWidth: 1024
#MainFormHeight: 768
'Encrypt / Decrypt
#AdditionalJar: bcprov-jdk15on-154
#End Region
Sub Process_Globals
Private fx As JFX
Private MainForm As Form
Type SinglePassword(Id As Int,Name As String,User As String,Url As String,Password() As Byte,Changed As Long,Source As String,Mail As String,Note As String)
End Sub
Sub AppStart (Form1 As Form, Args() As String)
DateTime.DateFormat = "dd.MM.yyyy HH:mm:ss"
MainForm = Form1
'MainForm.RootPane.LoadLayout("Layout1") 'Load the layout file.
MainForm.Show
Request
End Sub
'Return true to allow the default exceptions handler to handle the uncaught exception.
Sub Application_Error (Error As Exception, StackTrace As String) As Boolean
Return True
End Sub
Sub Request()
Dim Job As HttpJob
Job.Initialize("",Me)
Job.Username="abc"
Job.Password="123"
Job.Download2("https://any.ddns.net/request", Array As String("cmd", "list", "filter", ""))
Dim ser As B4XSerializator
Wait For (Job) JobDone(Job As HttpJob)
If Job.Success Then
Dim buffer(Job.GetInputStream.BytesAvailable) As Byte
Dim List1 As List
Job.GetInputStream.ReadBytes(buffer, 0, buffer.length)
List1 = ser.ConvertBytesToObject(buffer)
For Each Item As SinglePassword In List1
Log(Item.Id & " " & Item.Name)
Next
End If
Job.Release
End Sub