Android Question using post string

Makumbi

Well-Known Member
Licensed User
Please help i have this example about posting string and returning data . How can i use this very example to find my coding please help . Note i got this example below on this platform but iam failing to use it
B4X:
Dim J As HttpJob
        J.Initialize(Null, Me)
        J.PostString($"https://api.twelvedata.com/complex_data?apikey=${Twelvedata_APIKey}"$, JSONGenerator.ToString.Replace("\", "").Replace("""[", "[").Replace("]""", "]")) 'REMOVE UNNECESSARY CHARACTERS
        J.GetRequest.SetContentType("application/json")

    Wait For (J) JobDone(j As HttpJob)
    If J.Success Then
        Log(J.GetString)
       
        If J.GetString.Contains("**symbol**") Then
            ToastMsg.Show($"Select another symbol${CRLF}${Symbol} is not available with your plan"$)
        Else
            ParseTickerData(J.GetString) 'Parge the company ticker JSON data
        End If
    End If
    j.Release

This is the URL i wanted to use
B4X:
http://localhost:5216/api/HandlerVBLoadterm?customerid=0782911364&customerid2=Father

This is the Json that is returned
B4X:
[{"Account":"19-07561","Expressed":"END TERM 1 2019"},{"Account":"19-07561","Expressed":"MID TERM 1 2019"}]
 
Top