Dim values As Map = CreateMap("aidi": Main.idFirmaCurenta)
Dim JSONGenerator As JSONGenerator
JSONGenerator.Initialize(values)
Dim j As HttpJob
j.Initialize("",Me)
Dim encodedValues As String = UrlEncodeMap(values)
Log(encodedValues)
j.PostString("http://api.mysite.eu/api/togglefirma",encodedValues)
j.GetRequest.SetHeader("Authorization","Bearer " & Main.Token)
j.GetRequest.SetContentType("application/x-www-form-urlencoded")
wait for (j) JobDone(job As HttpJob)
If job.Success Then
Log('OK')
Else
Log(job.ErrorMessage)
End If