Android Question Weird rss error

rosippc64a

Active Member
Licensed User
Longtime User
Hi all!
There is an rss page: https://totalcar.hu/rss
If I try to load with firefox, it fail without any error. If I try with Microsoft Edge or Chrome, it success.
If I want to download with this,
B4X:
       Dim j As HttpJob
        j.Initialize("", Me)
        j.Download(url)
        Wait For (j) JobDone(j As HttpJob)
        If j.Success Then
            getRSS2(j)
        Else
       ....
its result is always j.success = false, but even I can retrieve the good rss.xml with this:
B4X:
    If RSSLink.Contains("totalcar") Then
        Dim html As String = j.ErrorMessage
        res = True
    Else
        Dim html As String = j.getstring
    End If
Where (how) can I examine the reason of unsuccess?
 

DonManfred

Expert
Licensed User
Longtime User
its result is always j.success = false
Then the FIRST you should DO is to log j.ErrorMessage
Where (how) can I examine the reason of unsuccess?
I suggest to get familar with okhttputils2. See the similar threads above. Or search the Forum; there are plenty of examples, questions.

But this all does not help if you just not use the given Infos.
If job.success is false then you can get the reason with job.ErrorMessage.
 
Upvote 0

rosippc64a

Active Member
Licensed User
Longtime User
Thank you for your reply. This isn't my first encounter with okhttputils2, I use it for a lot of occasion, but first strange behaviour.
As I wrote and the code snippet shows also, there is in the j.errormessage not at all any error reason/errormessage, but the j.errormessage contains the whole and correct rss, what I wanted to download!
My question is about this strange case. What is the error, if download result is unsuccess, but no error message but a correct rss in j.errormessage? Is it a strange matter, isn't it?
 
Upvote 0

rosippc64a

Active Member
Licensed User
Longtime User
But despite of not found, in the j.errormessage contains the whole correct rss! Then I have to assume that it is a webpage error?
 
Upvote 0
Top