Hi, please help, what do I do wrong?
proc getData(urlR: string): Future[(bool, string)] {.async.} =
var client = newAsyncHttpClient()
var r = await client.request(url = urlR)
result = await r.bodyStream.read()
var r = waitFor getData("https://pde.cit.api.here.com/1/tiles.json?layers=PSTLCB_GEN,PSTLCB_GEN,PSTLCB_GEN,PSTLCB_GEN,PSTLCB_GEN,PSTLCB_GEN,PSTLCB_GEN,PSTLCB_GEN&levels=12,12,12,12,12,12,12,12&tilexy=6523,1907,6524,1907,6525,1907,6526,1907,6527,1907,6528,1907,6529,1907,6530,1907&app_id=NRQTf9fPQwBbKMe5uh1O&app_code=1hNS1cEpObup1p1AKfxSyw&meta=1")
echo r[0]
echo r[1].len
echo r[1]
thanks
@dom96 thanks a lot!
ok, this is a special for FutureStream for string type. yeah, I did not understand what is use case the proc read of FutureStream[T] ....