Hi everyone, im new to b4a and learning on my own. Am i doing the right thing to get the strings from this example url . Thank you
Im trying to run the code one line at a time and httpjob does not step in if statement.
thanks for your help
B4X:
Sub send_url
Dim j As HttpJob
j.Initialize("",Me)
j.download("https://www.tpcph.com/sa/index.php?c=jeffrey|123")
Wait For (j) JobDone(j As HttpJob)
If j.Success Then
Log(j.getstring)
MsgboxAsync(j.GetString,"laman")
End If
j.Release
End Sub
Hi Jeffrey,
Welcome here. There is a large group of very helpful B4Xers here that will unconditionally help you - provided a few conditions are met.
Start by reading this How to post
And then watching Erels videos and reading Klaus' Booklets.
Then, when you want to post code (as an example or whatever) at the top of the post is a toolbar - there you will find CODE - use that to post your code.
Sorry guys. ill update my title
I tried mcqueccu suggestion using j.download(url) but what happens is it skips to the next sub and does not step in if j.success.
I think this particular Url requires a certificate loaded in your Java app as I get errors like 'javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target'
@Jeffrey Nidoy Press CTRL+B and add this to conditional symbols - last box
HU2_ACCEPTALL
RESULT:
Service started in foreground mode.
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
*** Service (httputils2service) Create ***
(Http client initialized with accept all option.)
** Service (httputils2service) Start **
1|Welcome to UP Town Mall.
2021-02-15 04:44:18
PCL100