Hello good people,
I need to get a boolean true or false for page 404 (page not found) . (such as http://nonexistingdomain.com/342.html)
what would be the best method to do this?
I am trying to use the example here with no success :
when I call the check_http sub and go step by step in debugger mode, it seems that it skips the Sub JobDone completely.
help as usual will be very appreciated.
I need to get a boolean true or false for page 404 (page not found) . (such as http://nonexistingdomain.com/342.html)
what would be the best method to do this?
I am trying to use the example here with no success :
WebView Error 404 or ERR_ADDRESS_UNREACHABLE
Hello, I would like to intercept error 404 or ERR_ADDRESS_UNREACHABLE when using the webview, I do not know how to do it, I looked in the forum and I followed the several examples But none worked so I would like to know if someone can please help me, my code is simple: #Region Project...
www.b4x.com
when I call the check_http sub and go step by step in debugger mode, it seems that it skips the Sub JobDone completely.
B4X:
Sub check_http
Dim job1 As HttpJob
job1.Initialize("Job1", Me)
' 'Send a GET request
job1.Download(WebAddress)
End Sub
'
Sub JobDone (job As HttpJob)
Log("JobName = " & job.JobName & ", Success = " & job.Success)
If job.Success = False Then
Log("Error: " & job.ErrorMessage)
'do something else
Msgbox ("error.","")
Else
Log(job.GetString)
'do something if ok
WebView1.LoadUrl(WebAddress)
End If
job.Release
End Sub
help as usual will be very appreciated.