Results 1 to 2 of 2

Thread: Using Post string

  1. #1

    Thread Starter
    Member
    Join Date
    Sep 2020
    Location
    Kampala
    Posts
    39

    Using Post string

    Please help i have this example about posting string and returning data . How can i use this very example to my coding please help .
    Code:
    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
    How can i use the code above to use the posting example using these examples below

    Code:
    http://localhost:5216/api/HandlerVBLoadterm?customerid=0782911364&customerid2=Father
    Code:
    [{"Account":"19-07561","Expressed":"END TERM 1 2019"},{"Account":"19-07561","Expressed":"MID TERM 1 2019"}]

  2. #2
    PowerPoster Poppa Mintin's Avatar
    Join Date
    Mar 2009
    Location
    Bottesford, North Lincolnshire, England.
    Posts
    2,423

    Re: Using Post string

    Hi,

    It's most unusual for a thread to remain unanswered for this long, it indicates that your coding is also unusual, I would suggest that you try something else, I recommend that you totally avoid 'Wait For', use whatever 'JobDone' is to run the code in your 'Wait For - If' code.

    Poppa
    Along with the sunshine there has to be a little rain sometime.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width