Android Question need help on poststring.

chaiwatt

Member
Licensed User
Longtime User
Hi Erel!,
I really need help on HttpUtils2, I use poststring method to put input criteria into php code.

Dim Job As HttpJob
Job.Initialize("JobPostName",Me)
Job.PostString ("http://xxxxxx.com/getmysql.php","tbid=mytable" & "&mday=" & itemday & "&mmonth=" & itemmonth & "&myear=" & itemyear )


I can have correct content only first request.

Dim tempstr As String
Log("JobName = " & Job.JobName & ", Success = " & Job.Success)
If Job.Success = True Then
Select Job.JobName
Case "JobPostName"
tempstr = Job.getstring


Let say I have result like this.
======
Name:Mr.AAA Salary:AAA
Name:Mr.BBB Salary:BBB
Name:Mr.CCC Salary:CCC
Name:Mr.DDD SalaryDD
Name:Mr.EEE Salary:EEE
======

Then I try changing criteria on next request but I still get the same content. Seem HttpUtils does not fetch new data or pending on cookie something, I don't know. Pls advise,thanks.





 

sorex

Expert
Licensed User
Longtime User
well, the hints I gave you worked for several people so I don't know why it goes wrong at your end.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
HttpUtils2 (and Http llibrary) do not cache anything.

If you get old results then there are three possible options:
1. The server is returning the old results for some reason.
2. You are not checking that Job.Success is true.
3. You are reusing the same HttpJob object for multiple requests. You need to call Dim and then Initialize.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…