Private Sub btnEnter_Click
Dim j As HttpJob
Dim Map1 As Map
If txtName.Text<>"" And txtPassword.Text<>"" Then
Dim strName As String = txtName.text
Dim strPassword As String = txtPassword.text
j.Initialize("", Me)
j.Download2("http://xxxxx.azurewebsites.net/oauth/token", _
Array As String("username",strName,"password",strPassword,"grant_type","password"))
j.GetRequest.SetContentType("application/x-www-form-urlencoded")
j.GetRequest.SetHeader("Accept", "application/json")
j.GetRequest.SetHeader("Content-Type", "application/json")
Wait For (j) JobDone(j As HttpJob)
If j.Success Then
Log(j.GetString)
End If
Log("Err! " & j.GetString)
j.Release
Else
Msgbox("Enter all fields and try again","Login")
End If
End Sub