my app is inside an mobile telephonbook site; i transmit name and adress to the site;
after an adress was choosen, there is the possibility for storing this adress in vcf format.
Dim Job As HttpJob
Job.Initialize("Job",Me)
Job.Download(URL1)
ProcessHTML(URL1)
With this code i get the vcf file not as file, than as text in smallest possible chars...
Then i get a toast message: Error: Internal Server Error
My Know How of webtechnologie is not enough to handle this result.
Any hints?
Sorry, I was unable to ask exactly: the upper code is processed for starting the download job. When i use this statement: ProcessHTML i get the internal Server Error in JobDone Event ; if i dont use this one line, i see the vcf file inside my webview in the smallest possible size and JobDone is never used.
I tried to use the same mobile web adress with chrome on android and get the same result: the file source is shown as text file.
When i use a desktop browser, i get the an normal download dialog.
The mobile website is: http://mobil.dasoertliche.de
Here you can choose on adress and click on "Ins Adressbuch"
An swiss and an austrian variant of the almost same problem are running.
Ok. I understand. The problem is that you need to send the session cookies together with the request. You can use this (B4A) library to get the cookies: [lib] CookieManager
You will need to then add the cookies to the request.
B4X:
Job.Download(...)
Job.GetRequest.SetHeader("Cookie", <cookies>) 'make sure to add a reference to Http library.
It works!
Many thanks to you and warwound for the library.
One last question (for today): I tried to use the cookieManager from B4J - the lib was shown, but Dim of the manager was not possible. Is there recompilation needed?