HTTP-library - Not receiving all requested data

moster67

Expert
Licensed User
Longtime User
I have some code in Basic4PPC which fetches a web-page (a URL to which I add parameters) which I thereafter use for parsing.

When trying the same in Basic4Android, it will only return the fetched page partially (it seems to fetch only the html-body) and then it stops. Same page loads nicely in B4A Webview but there is no way I can read the HTML-source in WebView for parsing the result.

In Basic4PPC I use the HTTP-library. Part of the code used to retrieve the data is as follows:


Here is a snippet of the code used in Basic4Android:


Both in B4PPC and B4A, I use Response.GetString to collect the data.

I don't know much about HTTP Post, HTTP Get and I can't understand why in B4PPC I get all data while in B4A only partial data. It seems like the two HTTP-libraries are behaving differently.

I read that in B4A the HttpRequest is asynchronous. I don't know about B4PPC. Could this be the problem? If I want to make a synchronous HttpRequest, how do I do it?

Can I use any other method to see if I can retrieve the whole amount of data? If yes, a short example would be nice since, as I already said, I don't know much about HTTP-stuff.

BTW: the B4A HTTP-library is version 1.08 which I guess is the latest

Many thanks in advance for your help.
 

moster67

Expert
Licensed User
Longtime User
:sign0060:

You're a genius, Erel. I didn't know that logcat would truncate after a certain amount of characters. I populated an EditText with my data and it worked as expected.

I tend to use logcat a lot and when I only noted partial data in the log, I thought it was something wrong with my code.

BTW: are you working on debugging tools (execute code step by step, breakpoints and so on)?

Thanks.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…