arpitbandi
Member
hi guys, trying to post a json for an api.. tried to do exactly as per the httputils guide and tweaked as per most forum suggestions but couldn't find any result..(not getting any response, it doesnt go beyond wait for i suppose..) can anyone please point out what am i doing wrong.. below is my exact code if you wanna try out..
thanks in advance
thanks in advance
myCode:
Dim job As HttpJob
Dim Map1 As Map
Map1.Initialize
Map1.Clear
Map1.Put("key","eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJtYWlsSWRlbnRpdHkiOiJjeWJlcmRvY2dwYXlAZ21haWwuY29tIn0.GMdUQIpxRytu1LXZWjZtkiKOauNUadNODNXVjh5VHCg")
Dim JSON As JSONGenerator
JSON.Initialize(Map1)
Dim data As String = JSON.ToPrettyString(0) ' JSON.ToString()
Log(data)
job.Initialize("getind",Main)
job.PostString("https://data.geoiq.io/dataapis/v1.0/covid/availablecities",data)
job.GetRequest.SetContentType("application/json")
Wait For (job) JOBDone(job As HttpJob)
Log(job.Response)
If job.Success Then
Log(job.GetString)
End If
job.Release