Android Question New version httputils

jeronimovilar

Active Member
Licensed User
Longtime User
My application was B4a 2.02 Version. In new version i changed httputils for the libraries HttpUtils2, but shows ther error now:
Error description: Undeclared variable 'httputils' is used before it was assigned any value.Error occurred on line: 151 (Main)

Line 151: HttpUtils.PostString("LINGUAGEM", ServerUrl, "query=select%20LINGUAGEM%20from%20wInternet")

What do i change?
 

jeronimovilar

Active Member
Licensed User
Longtime User
I called the .PostString with address url (in old version):
ServerUrl = "http://192.168.0.1/base3.asp"
HttpUtils.PostString("NAME", ServerUrl, "query=select%20LINGUAGEM%20from%20wInternet")

New Version: J.PostString(("NAME", "query=select%20LINGUAGEM%20from%20wInternet")

Where do i configure the server address?
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Upvote 0

jeronimovilar

Active Member
Licensed User
Longtime User
Sorry, but i dont know what the use for call the SQL sintaxe and the server addres yet.
PostString? PutString?
Please, How to change this (old version): HttpUtils.PostString("JobCase", "http://192.168.0.100/base3.asp", "Select * from table")??
I´m not expert :(
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
HttpUtils.PostString("JobCase", "http://192.168.0.100/base3.asp", "Select * from table")??
B4X:
    Dim j As HttpJob
    j.Initialize("JobCase", Me)
    j.PostString("http://192.168.0.100/base3.asp","Select * from table")
    Wait For (j) JobDone(j As HttpJob)
    If j.Success Then
        Log(j.GetString)
    End If
    j.Release
 
Upvote 0

jeronimovilar

Active Member
Licensed User
Longtime User
Thank you. it work, but.... :)

I set one more value in old version that was see in JobDone:

HttpUtils.PostString("NAME", "link", "sql")

Sub JobDone (Job As String)
If Job = "NAME" Then ' fisrt value in PostScript

....

Is it possible yet??
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
1. You should start a new thread for any new question you have.
2. Check the available okhttputils examples. There are a lot. Get familar with okhttputils.
3. Please post MORE DETAILED questions in the new thread. Honestly i did not understand your question at all.
4. I never worked with the httputils (1) version. so i don´t know what you are talking here.
 
Upvote 0
Top