My code is simple as below:
I call the "Submit" program with two url with same html file but in two different servers. I found the following error:
1. The program can acces url from server 1 without problem. Message "Done"
2. The program failed to access url from server 2 with error mesages as below
- if use wifi, error message said "Bad Request"
- if use gprs, error message said "Not Found"
3. I load the same url from server 2 into webview, no problem
I browsed thrugh the "bad request" posts but cannot find solution. Any suggestions?
B4X:
Sub submit(url As String, parm As String, jobname As String)
Dim job1 As HttpJob
job1.Initialize(jobname, Me)
job1.PostString(url, parm)
job1.GetRequest.Timeout = 10000
End Sub
Sub JobDone (Job As HttpJob)
If Job.Success = True Then
Select Job.JobName
Case "job1", "job2"
ToastMessageShow("Done: " & Job.JobName, False)
End Select
Else
ToastMessageShow("Error: " & Job.JobName &":" & Job.ErrorMessage, False)
End If
Job.Release
End Sub
I call the "Submit" program with two url with same html file but in two different servers. I found the following error:
1. The program can acces url from server 1 without problem. Message "Done"
2. The program failed to access url from server 2 with error mesages as below
- if use wifi, error message said "Bad Request"
- if use gprs, error message said "Not Found"
3. I load the same url from server 2 into webview, no problem
I browsed thrugh the "bad request" posts but cannot find solution. Any suggestions?