Sub get_token
Dim stringtosend As String = $"{"clientId" : "gmyClientID", "userName" : "myUserName", "password" : "aPassword", "cleanSession" : false }"$
Dim j As HttpJob
j.Initialize("", Me)
Log("Initialising")
Dim link As String = "https://node02.myqtthub.com/login"
j.poststring(link,stringtosend )
Wait For (j) JobDone(j As HttpJob)
If j.Success=True Then
Log(j.getstring)
Log("success")
Dim result As String = j.GetString
Dim s As String = Regex.Split(",",result)(4)
Log(s)
Dim t As String = Regex.Split(":",s)(1)
Log(t)
Dim l As Int = t.Length
Dim token As String = t.SubString2(0,l-1)
Log(token)
j.Release
Else
'do something'
Log("didn't work")
j.Release
End If
End Sub