I'm using the following code to retrieve some json
and I get the following error
java.lang.RuntimeException: Only Post / Put requests support this method.
Any ideas ?
B4X:
Sub login()
Dim job1 As HttpJob
job1.Initialize("mcma.login", Main)
Dim url As String
Dim s As serverConn
s.Initialize()
url = "http://" & s.getServer("serverip") & ":" & s.getServer("port") & "/data.json"
job1.Download2(url, Array As String("req", "login", "token", "", "MCMASESSIONID" , "", "username", s.getServer("userid"), "password", s.getServer("password")))
job1.GetRequest.SetContentEncoding("application/json")
End Sub
and I get the following error
java.lang.RuntimeException: Only Post / Put requests support this method.
Any ideas ?