Android Question download2 httpjob

tufanv

Expert
Licensed User
Longtime User
Hello,

I need advice on stg. I need to send api request to an url and get json response.

B4X:
    Dim connection As HttpJob
    connection.Initialize("getir",Me)
    connection.Download2("http://example.com", Array As String ("token", 323298fs23,"currency",listpage.Get(0)))

What I need to send according to api usage tutorial is :

https://example.com?token=ACCESS_TOKEN&currency=EUR/USD+EUR/GBP

now the problem is , for the currency= I need to send multiple currencies according to what use selected. it is the listpage that holds the currencies. It can be 1 currency or 50 currencies according to what user wanted to see.

If i send the request as
B4X:
connection.Download2("http://example.com", Array As String ("token", 323298fs23,"currency",listpage.Get(0)))

I can get the first currency on the list , but lets say user has 20 currencies , I cant know it for sure so I can't send it one by one ,
can you advice me a way to send a request to get all the users list and also please consider there must be a plus between all currencies while requesting.

Thanks In Advance.
 

DonManfred

Expert
Licensed User
Longtime User
How about iterating through the list and creating a big string with all Currencies?
 
Upvote 0
Top